Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Less javascriptEnabled Usage #5829

Closed
itayod opened this issue Sep 24, 2020 · 3 comments · Fixed by #8552
Closed

Remove Less javascriptEnabled Usage #5829

itayod opened this issue Sep 24, 2020 · 3 comments · Fixed by #8552
Assignees
Labels
🐜 Ant Design ❓ FAQ Frequently asked questions.
Milestone

Comments

@itayod
Copy link

itayod commented Sep 24, 2020

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...

@hsuanxyz
Copy link
Member

For now, we can't remove of it. angular/angular-cli#10430

@hsuanxyz hsuanxyz added 🐜 Ant Design ❓ FAQ Frequently asked questions. labels Sep 25, 2020
@itayod
Copy link
Author

itayod commented Sep 27, 2020

@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.

@hsuanxyz hsuanxyz added this to the backlog milestone Oct 23, 2020
@micobarac
Copy link

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:

@HyperLife1119 HyperLife1119 linked a pull request May 27, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐜 Ant Design ❓ FAQ Frequently asked questions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants