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

feat(wasm): new wasm plugin (.wasm?init) #8219

merged 6 commits into from May 20, 2022


Copy link

@sapphi-red sapphi-red commented May 18, 2022


This PR implements #7763.

Changes in this PR:

  • BREAKING: import foo from 'foo.wasm' no longer returns a value. Now it throws an error that shows "ESM integration for Wasm" is not supported.
  • import foo from 'foo.wasm?init' behaves simillar to the previous import foo from 'foo.wasm'. The difference is the previous one returns WebAssembly.Exports but this returns WebAssembly.Instance.

close #3847
close #5615
refs #4551 (not close as this PR does not implement "ESM integration for Wasm")

superseds close #7181

Additional context

See #7763 for more details about the reasons.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added this to the 3.0 milestone May 18, 2022
@bluwy bluwy added the p3-significant 🔨 High priority enhancement (priority) label May 19, 2022
@patak-dev patak-dev merged commit 75c3bf6 into vitejs:main May 20, 2022
@sapphi-red sapphi-red deleted the feat/new-wasm-plugin branch May 20, 2022 09:11
sapphi-red added a commit to sapphi-red/vite that referenced this pull request May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
breaking change feat: wasm p3-significant 🔨 High priority enhancement (priority)
None yet
3 participants