ERROR in ./src/page/index/index.css
Module parse failed: C:\Users\Administrator\Desktop\mukewang\src\page\index\index.css Unexpected token (2:4)
You may need an appropriate loader to handle this file type.
|
| body{
| background: #cccccc;
| }
@ ./node_modules/style-loader!./src/page/index/index.css 4:14-38
"devDependencies": {
"css-loader": "^0.28.7",
"extract-text-webpack-plugin": "^3.0.1",
"style-loader": "^0.19.0",
"webpack": "^3.7.1"
},
var config = {
entry: {
'index': ['./src/page/index/index.js'],
'login': ['./src/page/login/index.js'],
'common':['./src/page/common/common.js']
},
output: {
path: path.resolve(__dirname, './dist'),
filename: 'js/[name].js'
},
externals:{
'jquery':'window.jQuery'
},
module:{
loaders:[
{ test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader","css-loader") }
]
},
plugins:[
new webpack.optimize.CommonsChunkPlugin({
name :'common',
filename:'js/base.js'
})
,
new ExtractTextPlugin("css/[name].css")
]
};