我是webpack 2的新手,我的问题是当我运行webpack-server(http://localhost:8080/)时,webpack没有在正确的页面中重定向我而且我的css也没有工作。 我得到这个页面:enter image description here
我的webpack.config.js:
const ExtractTextPlugin = require("extract-text-webpack-plugin");
var path = require("path");
module.exports = {
entry : './src/app.js',
output : {
path : path.resolve(__dirname,'dist/'),
filename : 'app.bundle.js'
},
module : {
rules : [
//{test: /\.css$/, use: ExtractTextPlugin.extract(['style-loader','css-loader'])},
{test: /\.scss$/,
loader: ExtractTextPlugin.extract({
fallback: "style-loader",
use: ['css-loader','sass-loader'],
publicPath: "/dist"
})}
]
},
plugins: [
new ExtractTextPlugin({
filename: "/dist/app.scss",
disable: false,
allChunks: true
})
]
}
谢谢你!