Skip to content

Instantly share code, notes, and snippets.

@dsibiski
Created July 27, 2015 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsibiski/734ab44e946987f9c822 to your computer and use it in GitHub Desktop.
Save dsibiski/734ab44e946987f9c822 to your computer and use it in GitHub Desktop.
Webpack Config - 'webpack -p' not working for JS/CSS in NPM modules
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