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

fix: prepend config.base to vite/env path #13941

Merged
merged 2 commits into from Jul 24, 2023

Conversation

danielroe
Copy link
Contributor

@danielroe danielroe commented Jul 24, 2023

Description

nuxt/nuxt#20771
sqlite/sqlite-wasm#8

This PR prepends /@vite/env with the configured base path, which is required to import this properly in Nuxt, which adds a /_nuxt base path. I think this should also be a bug in other contexts, not just Nuxt.

This is what we are doing for the client path:

https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/css.ts#L463-L466

Additional context


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 PR Title 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.

@stackblitz
Copy link

stackblitz bot commented Jul 24, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@patak-dev
Copy link
Member

Thanks Daniel! Interesting that we didn't get reports sooner about this.

@patak-dev patak-dev added p3-minor-bug An edge case that only affects very specific usage (priority) feat: web workers labels Jul 24, 2023
@patak-dev patak-dev enabled auto-merge (squash) July 24, 2023 15:13
@patak-dev patak-dev merged commit 8e6cee8 into vitejs:main Jul 24, 2023
15 checks passed
@danielroe danielroe deleted the fix/worker-base branch July 24, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: web workers p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants