ng-zorro-antd
ng-zorro-antd copied to clipboard
Remove Less `javascriptEnabled` Usage
Environment
Environment | Info |
---|---|
ng-zorro-antd | 9.3.0 |
Browser | any |
Description
Currently the library's less files are depending on javascriptEnabled
option in less-loader
config, unfortunately due to security issues this feature was deprecated long ago...
I have seen that Angular still uses this flag in his default Webpack config for less but going forward I guess it is a good idea to remove as I am not sure how long it will keep being supported (it is no longer works with higher less-loader
versions...).
Currently it is blocking me from creating custom themes, which really pull me back from using this awesome library, I will be glad if you could fix that soon...
For now, we can't remove of it. https://github.com/angular/angular-cli/issues/10430
@hsuanxyz any plans to do so in the future? as you can see in the issue you have linked for it says:
However, since this feature is deprecated upstream from us, it will still go away in a future version of Angular CLI when Less no longer supports it.
This problem has been on for 4 years. It's about a high time to remove javascriptEnabled
feature from sass styles:
▲ [WARNING] Deprecated inline execution of JavaScript has been enabled ("javascriptEnabled") [plugin angular-less]
node_modules/ng-zorro-antd/style/color/bezierEasing.less:110:0:
110 │ .bezierEasingMixin();
╵ ^
JavaScript found within less stylesheets may be executed at build time. [https://lesscss.org/usage/#less-options]
Support for "javascriptEnabled" may be removed from the Angular CLI starting with Angular v19.
The plugin "angular-less" was triggered by this import
angular:styles/global:styles:1:8: