airyland / airyland/vux-loader

[Bug Report] Inline JavaScript is not enabled

Open
#82 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
64
Forks
37
PR merge metrics
No merged PRs in 30d

Description

### 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?
编译失败

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.