Inline JavaScript is not enabled
See original GitHub issueI’m getting the following error when using your package.
// https://github.com/ant-design/ant-motion/issues/44
.bezierEasingMixin();
^
Inline JavaScript is not enabled. Is it set in your options?
in node_modules/antd/lib/style/color/bezierEasing.less (line 110, column 0)
I have found out that javascriptEnabled is being set to true in the following snippet but the option is erroneously nested within the lessOptions object.
const lessLoaderIndex = lessModule.use.findIndex((item) => `${item.loader}`.includes('sass-loader'));
lessModule.use.splice(lessLoaderIndex, 1, {
loader: 'less-loader',
options: {
lessOptions: {
javascriptEnabled: true,
modifyVars,
},
},
});
Instead the options should be set to true like this:
const lessLoaderIndex = lessModule.use.findIndex((item) => `${item.loader}`.includes('sass-loader'));
lessModule.use.splice(lessLoaderIndex, 1, {
loader: 'less-loader',
options: {
javascriptEnabled: true,
modifyVars,
},
});
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Enable inline javascript in LESS
Use "--js" to enable inline JavaScript (not recommended).'); break;. So you should probably use '--js' in a static compilation ( command line ) ......
Read more >Inline JavaScript is not enabled. Is it set in your options?
However, when I'm trying to compile the project (npm run storybook) the following ERROR comes up: .bezierEasingMixin(); ^ Inline JavaScript is ...
Read more >less loader inline javascript is not enabled. is it set in your ...
By default, the Less Loader does not enable inline JavaScript. To enable it, you will need to set the javascriptEnabled option to true...
Read more >no-js" argument is deprecated, as inline JavaScript is ...
i tried to to run odoo 10 from eclipse in windows so i m getting this at the top of the page (lessc...
Read more >unsafe-inline ⟶ CSP Guide
Now becuase we specified 'self' in the script-src directive we can only load JS from the same origin as our app, the request...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks! I found the root of the problem. Having your plugin installed along with
@zeit/next-lesscaused two versions ofless-loaderbeing installed: 4.x and 6.x. Uninstalling@zeit/next-lesssolved the issue for me.Also, thanks for this plugin! I really appreciate it.
@llamadeus removing @zeit/next-less solved this issue for me. Thanks!