Array-Huang / webpack-seed

这是一个基于webpack的多页应用脚手架
https://segmentfault.com/a/1190000006843916
MIT License
1.19k stars 283 forks source link

在执行打包dll命令时报错No PostCSS Config found #21

Closed youkelike closed 7 years ago

youkelike commented 7 years ago

在执行打包dll命令时报错No PostCSS Config found in: webpack-seed-master\vendor\metisMenu,不知道为什么? 直接npm run start命令行没有报错,但网页上提示metisMenu is not a function,求指点

youkelike commented 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'], })]; },

Array-Huang commented 7 years ago

感谢,已修复