diff --git a/server/index.js b/server/index.js index 5c2508e2..dbd9cad6 100644 --- a/server/index.js +++ b/server/index.js @@ -22,7 +22,7 @@ if (process.env.NODE_ENV === 'development') { app.use(convert(devMiddleware(compile, { // display no info to console (only warnings and errors) - noInfo: false, + noInfo: true, // display nothing to the console quiet: false, diff --git a/webpack.config.dev.js b/webpack.config.dev.js index 2ea751df..84f09e3c 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -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', })); diff --git a/webpack.config.js b/webpack.config.js index 7f3765bc..2330d6a9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,5 @@ var path = require('path'); var webpack = require('webpack'); -var ExtractTextPlugin = require("extract-text-webpack-plugin"); // Load .env require('dotenv').config(); @@ -27,10 +26,6 @@ module.exports = { include: path.join(__dirname, 'frontend') }, { test: /\.json$/, loader: 'json-loader' }, - { - test: /\.s?css$/, - loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!sass?sourceMap') - }, { test: /\.(png|jpg|svg)$/, loader: 'url-loader' }, // inline base64 URLs for <=8k images, direct URLs for the rest { test: /\.woff$/, @@ -57,4 +52,7 @@ module.exports = { }), new webpack.ContextReplacementPlugin(/moment[\\\/]locale$/, /^\.\/(en)$/) ], + stats: { + assets: false, + }, }; diff --git a/webpack.config.prod.js b/webpack.config.prod.js index e99bea5d..6c7630ba 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -19,7 +19,10 @@ productionWebpackConfig = Object.assign(commonWebpackConfig, { publicPath: '/static/', }, }); - +productionWebpackConfig.module.loaders.push({ + test: /\.s?css$/, + loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!sass?sourceMap') +}); productionWebpackConfig.plugins.push(new HtmlWebpackPlugin({ template: 'server/static/index.html' }));