Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Target in Webpack plugin configuration #7

Open
justin0mcateer opened this issue Jan 7, 2023 · 0 comments
Open

Missing Target in Webpack plugin configuration #7

justin0mcateer opened this issue Jan 7, 2023 · 0 comments

Comments

@justin0mcateer
Copy link

Newer versions of wasm-pack seem to need the 'target' set to 'web', or webpack fails to load the WASM module complaining about 'no loader available'.

The fix was to simply pass that option into the WasmPackPlugin in the webpack.config.js file.

plugins: [
new WasmPackPlugin({
crateDirectory: __dirname,
extraArgs: "--target web"
}),
]

webpack/webpack#14087 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant