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

[V3] Some imports fail inside of workers in a production build #8946

Closed
7 tasks done
davidwallacejackson opened this issue Jul 6, 2022 · 1 comment
Closed
7 tasks done
Labels

Comments

@davidwallacejackson
Copy link
Contributor

Describe the bug

I'm instantiating a web worker from the monaco-yaml library. In v2, nothing unusual happens when I do this. In v3 beta 6, dev works normally, but in a build, the build fails with this error:

[vite:worker] 'Schema' is not exported by node_modules/js-yaml/index.js, imported by node_modules/monaco-yaml/lib/esm/_deps/yaml-language-server/lib/esm/languageservice/utils/parseUtils.js

Reproduction

https://stackblitz.com/edit/vitejs-vite-6xf52e?file=package.json,src%2FApp.tsx,src%2Fmonaco-setter.ts,src%2Fvite-env.d.ts,README.md&terminal=dev

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /bin/yarn
    npm: 7.17.0 - /bin/npm
  npmPackages:
    @vitejs/plugin-react: ^1.3.2 => 1.3.2 
    vite: 3.0.0-beta.6 => 3.0.0-beta.6

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red sapphi-red added the feat: deps optimizer Esbuild Dependencies Optimization label Jul 19, 2022
@patak-dev
Copy link
Member

I'm no longer able to reproduce this issue after updating to [email protected]. @davidwallacejackson I'm going to close it now, but let us know if you still see an issue here.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants