Adapt code to webpack 4 and less 3
Currently the code assumes webpack 3 and less 2, and some changes will need to be made to avoid warnings and errors.
This should work now, after adding javascriptEnabled: trueto less options and checking for compiler.hooks in the plugin, but it should be tested.
Also requires at least fixing #33
I'm trying with
"next": "^7.0.0-canary.0",
"@zeit/next-css": "^0.2.1-canary.2",
"@zeit/next-less": "^0.3.1-canary.2",
"@zeit/next-sass": "^0.2.1-canary.2",
but wrapping the loaders with your plugin manually over next.config.js ... could not get it to work though. I think mainly because it is webpack 4 after all.
Let us know if we can help to release a version for webpack 4
Much obliged, your plugin is great!
Hi @antenando,
I think this should mostly work with Webpack 4 already, and the present issue is writing some tests and examples.
In your case, unfortunately, the plugin won't work. This plugin creates a custom version of less-loader and sass-loader to do its job, so using it with any other loaders won't do anything. If you'd like to extend the functionality, though, please make a separate issue and we can discuss the specifics.
Getting the below issue after adding the antd-scss-theme-plugin to our project. we are using wepack: 4.40.2, less: 3.10.3, less-loader: 5.0.0, antd: 3.23.4
At first got the below error
`position: absolute;
top: 8px + @font-size-base * @line-height-base / 2 - @font-size-base / 2;`
After adding strictMath: true above error resolved.
After that got the below error
&-loading-icon {
.iconfont-size-under-12px(10px);
^
Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis?
in D:\Phoenix-spa\node_modules\antd\lib\cascader\style\index.less (line 217, column 6)
Its not resolving. Any one please help me on this.
At present my plugin code is like below
AntdScssThemePlugin.themify({
loader: 'less-loader',
options: {
javascriptEnabled: true,
strictMath: true,
sourceMap: isEnvProduction && shouldUseSourceMap
}
})