Created
July 9, 2017 20:03
-
-
Save dickolsson/0eed723f1c9f181a5bd18282ffcf7294 to your computer and use it in GitHub Desktop.
Example webpack.config.js for a dapp UI
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
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