Skip to content

2.0的定制主题文档有误 #3618

@Jane0220

Description

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

Version

2.0.0-rc.9

Environment

vue-cli3

Reproduction link

https://2x.antdv.com/docs/vue/customize-theme-cn/

Steps to reproduce

vue cli3的定制化配置,文档要求如下配置:

// vue.config.js for less-loader@6.0.0
module.exports = {
css: {
loaderOptions: {
less: {
lessOptions: {
modifyVars: {
'primary-color': '#1DA57A',
'link-color': '#1DA57A',
'border-radius-base': '2px',
},
javascriptEnabled: true,
},
},
},
},
};

实际多了lessOptions这一层,应该是

// vue.config.js for less-loader@6.0.0
module.exports = {
css: {
loaderOptions: {
less: {
modifyVars: {
'primary-color': '#1DA57A',
'link-color': '#1DA57A',
'border-radius-base': '2px',
},
javascriptEnabled: true,
},
},
},
};

What is expected?

能成功完成主题定制

What is actually happening?

按文档配置不起效果,发现官方文档有误(从1.X的文档到2.X的文档中,关于vue-cli3部分的配置都有问题)

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