如何在Webpack中重新加载sass?

任何机构知道configurationwebpack文件热重新加载sass文件? 这里是我的webpack.config文件,它只是支持HTML和JavaScript热reload.I急于使用sass热重载! 救命!救命!

这里是我的webpack.config

var ExtractTextPlugin = require('extract-text-webpack-plugin') var webpack = require('webpack') var path = require('path') module.exports = { entry: [ './src/main.js', ], output: { path: path.resolve(__dirname, 'build'), publicPath: '/build/', filename: 'build.js' }, module: { loaders: [ { test: /\.vue$/, loader: 'vue' }, { test: /\.js$/, loader: 'babel', exclude: /node_modules/, }, { test: /\.(png|jpg|gif)$/, loader: 'url?limit=8192', }, { test: /\.scss$/, loader: ["style", "css", "sass"] }, { test: /bootstrap\/js\//, loader: 'imports?jQuery=jquery' }, { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff" }, { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" }, { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml" } ] }, vue: { loaders: { css: ExtractTextPlugin.extract('css'), sass: ExtractTextPlugin.extract('css!sass') } }, plugins: [ new ExtractTextPlugin('./app.css'), new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin(), new webpack.optimize.OccurenceOrderPlugin(), new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('production') } }), new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery" }) ], debug: true, devtool: 'source-map' } 

server.js

 var express = require('express') var app = express() var open = require('open') var DEV_PORT = 8080 var config = require('./webpack.config.js') var myConfig = Object.create(config) var webpackDevServer = require('webpack-dev-server') var webpack = require('webpack') myConfig.entry.unshift('webpack-dev-server/client?http://localhost:8080/','webpack/hot/dev-server') new webpackDevServer(webpack(myConfig), { noInfo: false, hot: true, inline: true, historyApiFallback: false, publicPath: myConfig.output.publicPath, stats: { colors: true }, proxy: { '/admin/*': { target: 'http://localhost:3000' }, } }).listen(DEV_PORT, "localhost", err => { }) app.listen(5010, function() { console.log('waitint ....') }) 

不要使用ExtractTextPlugin。 没有热模块更换被列为文档中的缺点: https : //github.com/webpack/extract-text-webpack-plugin