SolidZORO / next-plugin-antd-less

🎩 Use Antd (Less) with Next.js v12, Zero Dependency on other Next-Plugins.
MIT License
345 stars 48 forks source link

Inline JavaScript is not enabled. Is it set in your options? [How to enable this in config?] #26

Closed hridoy43 closed 3 years ago

hridoy43 commented 3 years ago

Getting this error when building nexjs app with yarn build command, After configuring as u mentioned in doc.

Error-Log:

error - ./node_modules/antd/lib/button/style/index.less ((webpack)/css-loader/cjs.js??ref--5-oneOf-3-1!(webpack)/postcss-loader/cjs.js??ref--5-oneOf-3-2!(webpack)/resolve-url-loader??ref--5-oneOf-3-3!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-3-4!./node_modules/antd/lib/button/style/index.less)

// https://github.com/ant-design/ant-motion/issues/44 .bezierEasingMixin(); ^ Inline JavaScript is not enabled. Is it set in your options? in /Volumes/Mac-Util/Projects/thrive/vidar/node_modules/antd/lib/style/color/bezierEasing.less (line 110, column 0)

nextjs.config.js:
const withAntdLess = require('next-plugin-antd-less'); module.exports = withAntdLess({ javascriptEnabled: true, modifyVars: { '@primary-color': 'red' }, lessVarsFilePath: './styles/antd_theme.less', cssLoaderOptions: {}, webpack(config) { return config; }, });

daniboomerang commented 3 years ago

Same here

daniboomerang commented 3 years ago

Ok. @hridoy43 Fixed it by removing all old installed dependencies I had that were being used by next-plugin-antd-less So I removed from my package.json

  "@zeit/next-less": "^1.0.1",
  "null-loader": "2.0.0",
  "less": "3.0.4",
  "less-vars-to-js": "1.3.0",