Skip to content

Instantly share code, notes, and snippets.

@lord
Forked from ianjsikes/webpack.config.js
Last active October 21, 2017 17:15
Show Gist options
  • Save lord/75f8066f710cc050b13e58592d3971c8 to your computer and use it in GitHub Desktop.
Save lord/75f8066f710cc050b13e58592d3971c8 to your computer and use it in GitHub Desktop.
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: __dirname + '/build',
},
module: {
rules: [
{
test: /\.rs$/,
use: {
loader: 'wargo-loader',
options: {
// The path to the webpack output relative to the project root
path: 'build'
}
}
}
]
},
// The .wasm 'glue' code generated by Emscripten requires these node builtins,
// but won't actually use them in a web environment. We tell Webpack to not resolve those
// require statements since we know we won't need them.
externals: {
'fs': true,
'path': true,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment