Description
I am trying to incorporate this within webpack. I do not want to use any of the baby step cripple autogenerated js files because those are unnecasary http requests that need to be loaded into the browser. i am using the webpack WasmPackPlugin
library. my plugin setting is as follows.
new WasmPackPlugin({
crateDirectory: './src/rust_lib',
outDir: path.resolve(__dirname, 'dist'),
extraArgs: "--no-typescript --target web",
})
i have my hello world rust code inside of src/rust_lib
. i want it to compile the .wasm file in dist
. ONLY the .wasm file. right now in its current state it trys to make a package and generates a .gitignore
, index.js
, and package.json
. i do not want an npm package. i will be loading the index_bg.wasm
file directly from my main js. theres no need for a pointless http req made to get index.js
only to load the wasm. i know i could ignore the file and load it directly anyway but the contents of dist
are exposed in production and its important only whats needed is present. I also just want to have a clean setup with no clutter.
What i have tried so far is scowering the docs for args to do this. i got rid of the ts files with --no-typescript
and tried setting all kinds of different targets but it still tries to generate a package. How do i make it only generate the stand alone .wasm binary?