Better webpack settings for development

This commit is contained in:
Jori Lallo
2016-08-27 13:18:46 -07:00
parent c28a403321
commit 8ed81884d7
4 changed files with 12 additions and 9 deletions

View File

@ -1,6 +1,5 @@
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
const commonWebpackConfig = require('./webpack.config');
@ -15,10 +14,13 @@ const developmentWebpackConfig = Object.assign(commonWebpackConfig, {
],
});
developmentWebpackConfig.module.loaders.push({
test: /\.s?css$/,
loader: 'style-loader!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!sass?sourceMap',
});
developmentWebpackConfig.plugins.push(new webpack.optimize.OccurenceOrderPlugin());
developmentWebpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
developmentWebpackConfig.plugins.push(new webpack.NoErrorsPlugin());
developmentWebpackConfig.plugins.push(new ExtractTextPlugin('styles.css'));
developmentWebpackConfig.plugins.push(new HtmlWebpackPlugin({
title: 'Atlas',
}));