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

Magic header not detected (Webpack 4) #123

Open
budleigh opened this issue Dec 18, 2021 · 0 comments
Open

Magic header not detected (Webpack 4) #123

budleigh opened this issue Dec 18, 2021 · 0 comments

Comments

@budleigh
Copy link

Hi there - trying to integrate with a long-since-ejected CRA4 app. Using Webpack @4.44.2 and wasm-pack-plugin @1.6.0, my code (which amounts to literally the example code here) compiles correctly and I see the pkg output and have imported it into my normal JS code. I'm seeing a compilation error and a few additional errors in the browser amounting to:

  • "the magic header is not present"
  • "the .wasm file has the wrong mimetype (text)"
  • "I probably need a different loader for the file"

I've tried using wasm-loader to no avail. Anyone encountered this or do I need to bite the bullet and bump to Webpack 5?

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