Skip to content

Load less error on demand, version 1.7.4 #3858

@yudan215

Description

@yudan215
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-beta.12

Environment

Win10,Chorme,nuxt2.0

Reproduction link

https://www.antdv.com/

Steps to reproduce

plugins目录增加插件文件
aut-ui.js

import Vue from 'vue'
import Table from 'ant-design-vue/lib/table'; // 加载 JS
import Pagination from 'ant-design-vue/lib/pagination';
Vue.use(Table)
Vue.use(Pagination)

nuxt.config.js改为

css: [
'ant-design-vue/lib/table/style/index.css',
'ant-design-vue/lib/pagination/style/index.css',
],
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
config.module.rules.push(
{
test:/\.less/,
loader: 'less-loader', // compiles Less to CSS
options: {
modifyVars: {
'primary-color': '#00BD92',
},
javascriptEnabled: true,
},
}
)
}
}

在页面使用后出现报错

What is expected?

不报错,正常修改主题色

What is actually happening?

Module build faild
.icontfont-size-under-12px(10px);
Error evaluating function unit: the first argument to unit must be a number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions