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(plugin-vue): don't inline ts scripts during build #7909

Merged
merged 1 commit into from May 10, 2022

Conversation

jods4
Copy link
Contributor

@jods4 jods4 commented Apr 26, 2022

Partial revert of 93d9a2d
When building, TS scripts must not be inlined so that loaders (e.g. rollup-plugin-typescript2) are correctly applied.

Fixes #7908, #5795, #5044


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
Copy link
Member

sapphi-red commented Apr 26, 2022

I confirmed that this change does not impact performance when other loaders are not used at least for my project (containing 377 vue sfc components).

PS: I meant "performance" as "time to finish build".

@jods4
Copy link
Contributor Author

jods4 commented Apr 26, 2022

@sapphi-red Note that the change proposed in this PR only impacts build.
During dev the TS code is still merged into SFC and processed by esbuild regardless.
This is the simplest fix to #7908 and is sufficient for the use cases that have reported so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugin-vue doesn't respect configured loaders since 1.8
3 participants