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

refactor(runtime): share more code between runtime and main bundle #16063

Merged
merged 5 commits into from
Mar 5, 2024

Conversation

sapphi-red
Copy link
Member

Description

See each commits.

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, especially the Pull Request Guidelines.
  • 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).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added p1-chore Doesn't change code behavior (priority) feat: environment API Vite Environment API labels Feb 29, 2024
Copy link

stackblitz bot commented Feb 29, 2024

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

result.code = `${code.trimEnd()}\n//# sourceURL=${
mod.id
}\n${VITE_RUNTIME_SOURCEMAPPING_SOURCE}\n//# ${VITE_RUNTIME_SOURCEMAPPING_URL};base64,${sourceMap}\n`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed charset=utf-8 part.
JSON should be always utf-8 and the charset in mime doesn't have any effect according to the RFC.

@sapphi-red sapphi-red force-pushed the refactor/runtime-share-code branch from b0ee307 to 369c3f7 Compare February 29, 2024 16:36
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes looks great to me! Thanks for keep iterating and cleaning up the new code Sapphi ❤️

@patak-dev
Copy link
Member

/ecosystem-ci run

@patak-dev
Copy link
Member

@sheremet-va I'll let this one open a few days in case you'd like to take a look.

@patak-dev patak-dev merged commit 93be84e into vitejs:main Mar 5, 2024
10 checks passed
@sapphi-red sapphi-red deleted the refactor/runtime-share-code branch March 5, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: environment API Vite Environment API p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants