Created
November 7, 2016 18:34
-
-
Save badnorseman/c092d2f038e635b0cebb00c2f23b995d to your computer and use it in GitHub Desktop.
Webpack for development
This file contains 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 path = require("path"); | |
var webpack = require("webpack"); | |
module.exports = { | |
devtool: "eval-source-map", | |
entry: [ | |
"webpack-hot-middleware/client", | |
"./src/scripts/App.js" | |
], | |
output: { | |
path: path.join(__dirname, "dist"), | |
filename: "bundle.js", | |
publicPath: "/" | |
}, | |
plugins: [ | |
new webpack.optimize.OccurenceOrderPlugin(), | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoErrorsPlugin() | |
], | |
resolve: { | |
extensions: ["", ".js"] | |
}, | |
module: { | |
loaders: [{ | |
test: /\.js$/, | |
loader: "babel", | |
exclude: /node_modules/, | |
include: path.join(__dirname, "/src/scripts") | |
}, { | |
test: /\.css$/, | |
loader: "style-loader!css-loader" | |
}, { | |
test: /\.(jpg|png)$/, | |
loader: "url-loader?limit=8192" | |
}] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment