Run the CSS through webpack so we can pull in CSS files from modules with require rather than symlinking into the node_module directory which is breaking people on different npm versions.
This commit is contained in:
parent
819b80d30f
commit
7ff5e42f3e
7 changed files with 21 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
|
@ -9,6 +10,8 @@ module.exports = {
|
|||
loaders: [
|
||||
{ test: /\.json$/, loader: "json" },
|
||||
{ test: /\.js$/, loader: "babel", include: path.resolve('./src') },
|
||||
// css-raw-loader loads CSS but doesn't try to treat url()s as require()s
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract("css-raw-loader") },
|
||||
]
|
||||
},
|
||||
output: {
|
||||
|
@ -37,6 +40,9 @@ module.exports = {
|
|||
'process.env': {
|
||||
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
|
||||
}
|
||||
}),
|
||||
new ExtractTextPlugin("bundle.css", {
|
||||
allChunks: true
|
||||
})
|
||||
],
|
||||
devtool: 'source-map'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue