-
-
Save lord/75f8066f710cc050b13e58592d3971c8 to your computer and use it in GitHub Desktop.
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
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