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

document is not defined when using xxxx.wasm?url or ?worker in vite 4.3.1 #12970

Closed
7 tasks done
subframe7536 opened this issue Apr 24, 2023 · 0 comments · Fixed by #12988
Closed
7 tasks done

document is not defined when using xxxx.wasm?url or ?worker in vite 4.3.1 #12970

subframe7536 opened this issue Apr 24, 2023 · 0 comments · Fixed by #12988
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release

Comments

@subframe7536
Copy link

subframe7536 commented Apr 24, 2023

Describe the bug

import wasm using xxxx.wasm?url and the document is not defined appear in console when vite dev, #9879

Reproduction

https://github.com/subframe7536/kysely-sqlite-test

Steps to reproduce

pnpm install
pnpm run dev

System Info

System:
    OS: Windows 10 10.0.23440
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 1.94 GB / 15.77 GB
  Binaries:
    Node: 16.15.0 - D:\code\_env\node_16.15.0\node.EXE
    Yarn: 1.22.19 - D:\code\_env\node_16.15.0\node_modules\npm\Global\yarn.CMD
    npm: 8.5.5 - D:\code\_env\node_16.15.0\npm.CMD
  Browsers:
    Edge: Spartan (44.23440.1000.0), Chromium (112.0.1722.58)
    Internet Explorer: 11.0.23440.1000
  npmPackages:
    @vitejs/plugin-vue: ^4.1.0 => 4.1.0
    vite: ^4.3.1 => 4.3.1

Used Package Manager

pnpm

Logs

log in browser:

client.ts:368 Uncaught ReferenceError: document is not defined
at client.ts:368:1

Validations

@subframe7536 subframe7536 changed the title when using xxxx.wasm?url document is not defined when using xxxx.wasm?url in vite 4.3.1 Apr 24, 2023
@subframe7536 subframe7536 changed the title document is not defined when using xxxx.wasm?url in vite 4.3.1 document is not defined when using xxxx.wasm?url or ?worker in vite 4.3.1 Apr 24, 2023
@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release labels Apr 24, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants