Created
July 27, 2015 14:51
-
-
Save dsibiski/734ab44e946987f9c822 to your computer and use it in GitHub Desktop.
Webpack Config - 'webpack -p' not working for JS/CSS in NPM modules
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
path = require('path'); | |
webpack = require('webpack'); | |
var config = { | |
context: __dirname + "/app", | |
entry: { | |
javascript: "./app.js", | |
html: "./index.html", | |
}, | |
output: { | |
filename: "app.js", | |
path: __dirname + "/dist", | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.html$/, | |
loader: "file?name=[name].[ext]", | |
}, | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
loaders: ["react-hot", "babel-loader"], | |
}, | |
{ | |
test: /\.css$/, | |
loader: "style-loader!css-loader" | |
}, | |
], | |
}, | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment