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

Cannot find wasm file with custom file paths #101

Open
Norlock opened this issue Feb 7, 2021 · 1 comment
Open

Cannot find wasm file with custom file paths #101

Norlock opened this issue Feb 7, 2021 · 1 comment

Comments

@Norlock
Copy link

Norlock commented Feb 7, 2021

I have a directory in my source public, and in directory public I have my index.html. My scripts are located in public/dist. However when bundled it looks for the wasm file in the public dir instead of in public/dist where it is located.

webpack.config.zip

@minagawah
Copy link

@Norlock I guess you first need output.path to point to public/dist. Also, you need publicPath only when you serve contents from a specific subdirectory. Assuming your public (or public/dist) is not subdirectory but a document root for your server application, I don't think you need publicPath. Sorry if none of my words are irrelevant for I haven't used your config to actually test it out.
Also, if you are using Webpack 5, make sure to specify experiments.syncWebAssembly: true.

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

2 participants