1.5.4
mac chrome vue2.6.11 vue-cli3
https://antdv.com/docs/vue/customize-theme-cn/
from =================
// vue.config.js
module.exports = {
css: {
loaderOptions: {
less: {
modifyVars: {
'primary-color': '#1DA57A',
'link-color': '#1DA57A',
'border-radius-base': '2px',
},
javascriptEnabled: true,
},
},
},
};
to =============
module.exports = {
css: {
loaderOptions: {
less: {
lessOptions: {
modifyVars: {
'primary-color': '#1DA57A',
'link-color': '#1DA57A',
'border-radius-base': '2px',
},
javascriptEnabled: true,
}
},
},
},
};
### What is expected?
-
### What is actually happening?
-
The same vue.config.js file gave me compile errors when I updated less-loader to version 6.0.0, which had breaking changes (see 6.0.0 release note)
// vue.config.js
module.exports = {
css: {
loaderOptions: {
less: {
javascriptEnabled: true
}
}
}
}
You can make this work either by downgrading less-loader back to 5.0.0:
npm install --save-dev [email protected]
or by making your vue config work with the latest version of less-loader (6.0.0) by moving less-specific options (e.g. javascriptEnabled) to lessOptions
// vue.config.js
module.exports = {
css: {
loaderOptions: {
less: {
lessOptions: {
javascriptEnabled: true
}
}
}
}
}
Might be something to consider for PR https://github.com/vueComponent/ant-design-vue/pull/2150
The same vue.config.js file gave me compile errors when I updated
less-loaderto version6.0.0, which had breaking changes (see 6.0.0 release note)// vue.config.js module.exports = { css: { loaderOptions: { less: { javascriptEnabled: true } } } }You can make this work either by downgrading
less-loaderback to5.0.0:npm install --save-dev [email protected]or by making your vue config work with the latest version of
less-loader(6.0.0) by moving less-specific options (e.g.javascriptEnabled) tolessOptions// vue.config.js module.exports = { css: { loaderOptions: { less: { lessOptions: { javascriptEnabled: true } } } } }Might be something to consider for PR #2150
you are right. buddy
The same vue.config.js file gave me compile errors when I updated
less-loaderto version6.0.0, which had breaking changes (see 6.0.0 release note)// vue.config.js module.exports = { css: { loaderOptions: { less: { javascriptEnabled: true } } } }You can make this work either by downgrading
less-loaderback to5.0.0:npm install --save-dev [email protected]or by making your vue config work with the latest version of
less-loader(6.0.0) by moving less-specific options (e.g.javascriptEnabled) tolessOptions// vue.config.js module.exports = { css: { loaderOptions: { less: { lessOptions: { javascriptEnabled: true } } } } }Might be something to consider for PR #2150
yes,work,3q!
Most helpful comment
The same vue.config.js file gave me compile errors when I updated
less-loaderto version6.0.0, which had breaking changes (see 6.0.0 release note)You can make this work either by downgrading
less-loaderback to5.0.0:or by making your vue config work with the latest version of
less-loader(6.0.0) by moving less-specific options (e.g.javascriptEnabled) tolessOptionsMight be something to consider for PR https://github.com/vueComponent/ant-design-vue/pull/2150