diff --git a/webpack.config.js b/webpack.config.js index 188843f..1b10dd0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,14 +7,6 @@ var HtmlWebpackPlugin = require('html-webpack-plugin'); const HOST = process.env.HOST || "127.0.0.1"; const PORT = process.env.PORT || "8888"; -// global css -loaders.push({ - test: /[\/\\](node_modules|global)[\/\\].*\.css$/, - loaders: [ - 'style?sourceMap', - 'css' - ] -}); // local scss modules loaders.push({ test: /[\/\\]src[\/\\].*\.scss/, @@ -24,14 +16,6 @@ loaders.push({ 'sass' ] }); -// local css modules -loaders.push({ - test: /[\/\\]src[\/\\].*\.css/, - loaders: [ - 'style?sourceMap', - 'css' - ] -}); module.exports = { target: 'web', diff --git a/webpack.loaders.js b/webpack.loaders.js index 15988a5..00b5142 100644 --- a/webpack.loaders.js +++ b/webpack.loaders.js @@ -54,5 +54,12 @@ module.exports = [ test: /\.js$/, include: /node_modules\/mapbox-gl\/js\/render\/shaders.js/, loader: 'transform/cacheable?brfs' + }, + { + test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/, + loaders: [ + 'style?sourceMap', + 'css' + ] } ]; diff --git a/webpack.production.config.js b/webpack.production.config.js index 280a275..3543a67 100644 --- a/webpack.production.config.js +++ b/webpack.production.config.js @@ -6,22 +6,11 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var WebpackCleanupPlugin = require('webpack-cleanup-plugin'); -// local css modules -loaders.push({ - test: /[\/\\]src[\/\\].*\.css/, - loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]') -}); - // local scss modules loaders.push({ test: /[\/\\]src[\/\\].*\.scss/, loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]', 'sass') }); -// global css files -loaders.push({ - test: /[\/\\](node_modules|global)[\/\\].*\.css$/, - loader: ExtractTextPlugin.extract('style', 'css') -}); module.exports = { entry: {