You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to take a pkg directory and ship it around/use it directly as a static directory. However, it currently includes a package.json, .gitignore and a bunch of .d.ts files - it seems that the expectation is that I'm using NPM somewhere in my toolchain?
I'd like a way to say "just give me the static, assume nothing about my toolchain" - I don't want to distribute the directory and discover down the line that unexpected stuff has been bundled in (for example, the package.json currently contains my e-mail address).
(it may also be sufficient to just concretely specify+commit to what the directory will contain, as I can then add tooling to manipulate it without being surprised down the line by new stuff appearing)
Anyone else following this issue might be interested in using wasm-bindgen-cli directly instead of wasm-pack which wraps around it. After some investigation, I've discovered that the build process is quite simple; most of the benefit that wasm-pack provides is specifically designed for NPM integration.
...you'll get just the static <your_crate_name>_bg.wasm WASM file and <your_crate_name>.js JS wrapper created in the ./static directory. The output of wasm-bindgen --help is also quite useful for exploring other potentially useful flag options.
I'm not sure why wasm-bindgen-cli gets so much less attention compared to wasm-pack, but it would be neat to have better documentation comparing the two and describing their respective use-cases.
💡 Feature description
I'd like to take a pkg directory and ship it around/use it directly as a static directory. However, it currently includes a
package.json
,.gitignore
and a bunch of.d.ts
files - it seems that the expectation is that I'm using NPM somewhere in my toolchain?I'd like a way to say "just give me the static, assume nothing about my toolchain" - I don't want to distribute the directory and discover down the line that unexpected stuff has been bundled in (for example, the package.json currently contains my e-mail address).
(it may also be sufficient to just concretely specify+commit to what the directory will contain, as I can then add tooling to manipulate it without being surprised down the line by new stuff appearing)
Relates to:
.gitignore
generation #728The text was updated successfully, but these errors were encountered: