Created
January 8, 2016 10:20
-
-
Save henrikbjorn/3ecc0f1bdf234d430c22 to your computer and use it in GitHub Desktop.
WebPack config for bundling js and css files using modulish require.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
module.exports = { | |
entry : "./src/index.jsx", | |
output : { | |
path : "dist", | |
filename: "bundle.js" | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.(js|jsx)$/, exclude: /node_modules/, loader: "babel-loader" }, | |
{ test: /\.(css)$/, exclude: /node_modules/, loader: ExtractTextPlugin.extract('css-loader') } | |
] | |
}, | |
plugins: [ | |
new ExtractTextPlugin('bundle.css', { | |
allChunks: true | |
}) | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment