Created
June 20, 2017 20:26
-
-
Save ianjsikes/263bfe4759e999f4b50c0e489add3bc1 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: 'rust-wasm-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