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

feat: import ts with .js in vue #7998

Merged
merged 6 commits into from May 4, 2022
Merged

feat: import ts with .js in vue #7998

merged 6 commits into from May 4, 2022

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented May 3, 2022

Description

Fix #6671

Support importing .ts files via .js. Added a new meta.vite.lang flag to provide the hint.

Additional context

Initially instead of .lang I used .isTs, maybe that's desirable?


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.

@bluwy bluwy added plugin: vue p2-nice-to-have Not breaking anything but nice to have (priority) labels May 3, 2022
packages/plugin-vue/src/main.ts Outdated Show resolved Hide resolved
patak-dev
patak-dev previously approved these changes May 3, 2022
@patak-dev patak-dev requested a review from sodatea May 3, 2022 12:27
@shir0u
Copy link
Contributor

shir0u commented May 4, 2022

Very nice, hope this gets merged and released soon 👍

Copy link
Member

@sodatea sodatea left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@patak-dev patak-dev merged commit 9974094 into vitejs:main May 4, 2022
@bluwy bluwy deleted the vue-ts-import branch May 4, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript imports with ".js" file extension are failing.
6 participants