intoli / antd-scss-theme-plugin

A Webpack plugin for customizing Ant Design with an SCSS theme file and using Ant Design's compiled variables in SCSS files throughout your project.
https://intoli.com/blog/antd-scss-theme-plugin/
Other
202 stars 80 forks source link

Could not compile the SCSS theme file "../scss/app.scss" for the purpose of variable extraction #60

Open mazeeblanke opened 4 years ago

mazeeblanke commented 4 years ago

Hi, i have been trying to setup my project using this plugin. However the Plugin not working for me and keeps throwing error " Could not compile the SCSS theme file "../scss/app.scss" for the purpose of variable extraction. This is likely because it contains a Sass error "

Webpack version: 4.41 sass-loader: 8 less-loader: 5 antd-scss-theme-plugin: "^1.0.8"

ERROR in ./node_modules/antd/es/style/index.less (./node_modules/css-loader/dist/cjs.js??ref--4-1!./node_modules/antd-scss-theme-plugin/build/dist/lib/antdLessLoader.js??ref--4-2!./node_modules/antd/es/style/index.less)
    Module build failed (from ./node_modules/antd-scss-theme-plugin/build/dist/lib/antdLessLoader.js):
   Could not compile the SCSS theme file "../scss/app.scss" for the purpose of variable extraction. This is likely because it contains a Sass error.
    @ ./node_modules/antd/es/style/index.less 1:14-156 20:4-31:5 23:25-167
   @ ./node_modules/antd/es/button/style/index.js
    @ ./src/pages/Home/index.js
     @ ./src/App.js
    @ ./src/index.js
  @ multi ./src/index.js webpack-hot-middleware/client
exzizt commented 4 years ago

Same issue. Trying to use a function like darken, lighten, etc for colours causes this. Any way to fix this?