Created
October 7, 2017 07:42
-
-
Save scott-w/45a0fac10bf70352be23e3a074cb5743 to your computer and use it in GitHub Desktop.
Webpack configuration
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
const webpack = require("webpack"); | |
const path = require("path"); | |
module.exports = { | |
entry: { | |
app: ["./app/index.js"] | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
loader: "babel-loader", | |
query: { | |
presets: ["es2015"] | |
} | |
}, | |
{ | |
test: /\.html$/, | |
loader: "underscore-template-loader" | |
} | |
] | |
}, | |
output: { | |
filename: "bundle.js", | |
path: path.join(__dirname, "public/js") | |
}, | |
plugins: [new webpack.ProvidePlugin({ _: "lodash" })], | |
resolve: { | |
modules: [__dirname, "app", "node_modules"] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment