Closed youkelike closed 7 years ago
找到原因了,是webpack-dll.config.js文件中少了postcss相关的配置项:
const precss = require('precss'); const autoprefixer = require('autoprefixer'); ...... module: { loaders: [ { test: /\.css$/, exclude: /node_modules|bootstrap/, loader: 'style!css?minimize&-autoprefixer!postcss', }, { test: /\.less$/, include: dirVars.srcRootDir, loader: 'style!css?minimize&-autoprefixer!postcss!less', } ] }, postcss: function () { return [precss, autoprefixer({ remove: false, browsers: ['ie >= 8', '> 1% in CN'], })]; },
感谢,已修复
在执行打包dll命令时报错No PostCSS Config found in: webpack-seed-master\vendor\metisMenu,不知道为什么? 直接npm run start命令行没有报错,但网页上提示metisMenu is not a function,求指点