Weex使用Less
-
安装
npm install --save less
npm install --save less-loader
-
配置vue-loader
项目/config/vue-loader.conf.js 配置相关
module.exports = (options) => {
return {
loaders: utils.cssLoaders({
// sourceMap: use sourcemao or not.
sourceMap: options && sourceMapEnabled,
// useVue: use vue-style-loader or not
useVue: options && options.useVue,
// usePostCSS: use postcss to compile styles.
usePostCSS: options && options.usePostCSS
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
lang:{
'