airyland / airyland/vux-loader
[Bug Report] Inline JavaScript is not enabled
- 主要语言
- JavaScript
- 星标
- 64
- 派生
- 37
- PR 合并指标
- 30 天内没有已合并 PR
描述
### vux-loader version
1.2.9
### OS/Browsers version
Google Chrome 已是最新版本 版本 73.0.3683.103(正式版本) (64 位)
### Vue version
2.5.20
### Code
```html
在less文件中用该方式动态改变less中的变量
@color-theme: `document.getElementById("color-theme")`;
报错内容:
Module build failed:
// @color-theme: #5A9267;
@color-theme: `document.getElementById("color-theme")`;
^
Inline JavaScript is not enabled. Is it set in your options?
网上给的解决方案是修改webpack,添加如下行
{ loader: 'less-loader', options: { javascriptEnabled: true } }
但是不知道vux该如何修改?
```
### Steps to reproduce
在less文件中用该方式动态改变less中的变量
@color-theme: `document.getElementById("color-theme")`;
### What is Expected?
期望不会报错,并且可以通过js的方式进行动态更改less
### What is actually happening?
编译失败
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。