next.config.js 822 B

123456789101112131415161718192021222324
  1. /* eslint-disable @typescript-eslint/no-var-requires */
  2. const withAntdLess = require('next-plugin-antd-less');
  3. const { PHASE_PRODUCTION_BUILD } = require('next/constants');
  4. const COLORS = {
  5. GREY: '#303030',
  6. PURPLE: '#512da8',
  7. };
  8. module.exports = function (phase, { defaultConfig }) {
  9. // See https://github.com/SolidZORO/next-plugin-antd-less
  10. const config = withAntdLess({
  11. // Note this produces an unnecessary warning:
  12. // 'The root value has an unexpected property, modifyVars'
  13. // See https://github.com/SolidZORO/next-plugin-antd-less/issues/105
  14. modifyVars: {
  15. '@background': COLORS.GREY,
  16. '@primary-color': COLORS.PURPLE,
  17. },
  18. basePath: phase === PHASE_PRODUCTION_BUILD ? '/wallet-adapter/example' : '',
  19. });
  20. return config;
  21. };