Skip to content

Instantly share code, notes, and snippets.

@dickolsson
Created July 9, 2017 20:03
Show Gist options
  • Save dickolsson/0eed723f1c9f181a5bd18282ffcf7294 to your computer and use it in GitHub Desktop.
Save dickolsson/0eed723f1c9f181a5bd18282ffcf7294 to your computer and use it in GitHub Desktop.
Example webpack.config.js for a dapp UI
var webpack = require("webpack");
var path = require("path");
const www = path.resolve(__dirname, "www");
module.exports = {
entry: "./src/app.js",
output: {
filename: "bundle.js",
path: www
},
module: {
rules: [],
loaders: [
{
test: /\.json$/,
use: "json-loader"
}
]
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})
],
devServer: {
contentBase: www
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment