慕无忌1623718
webpack把各个模块的css打包成一个方法:webpack.config.js配置如下var ExtractTextPlugin = require("extract-text-webpack-plugin");//extract-text-webpack-plugin安装此插件module:{loaders:[{test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader")}]},plugins:[new ExtractTextPlugin("css/[name].css")//则会生成一个css文件]比如你的js文件中这样引入即可:import './css/lib/bootstrap.min.css'import './css/test.css';