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: use correct require extension to load config #9118

Merged
merged 2 commits into from Jul 15, 2022
Merged

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Jul 14, 2022

Description

Fix #9112

Check in _require.extensions for .ts added by ts-node before falling back to .js.

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

@netlify
Copy link

netlify bot commented Jul 14, 2022

Deploy Preview for vite-docs-main canceled.

Name Link
🔨 Latest commit 42a6d5b
🔍 Latest deploy log https://app.netlify.com/sites/vite-docs-main/deploys/62d03405fa3a1e0008e1bc31

@bluwy bluwy added the p4-important Violate documented behavior or significantly improves performance (priority) label Jul 14, 2022
@bluwy
Copy link
Member Author

bluwy commented Jul 14, 2022

My bad. Had to force-push. Committed to the wrong branch.

sodatea
sodatea previously approved these changes Jul 14, 2022
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.

Cool!
I was thinking about hard-coding .ts extension here, but this is definitely a better solution.

sapphi-red
sapphi-red previously approved these changes Jul 14, 2022
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

tested with \.[cm][jt]s and it worked 👍

@sapphi-red sapphi-red added the regression The issue only appears after a new release label Jul 14, 2022
@patak-dev
Copy link
Member

Looks good, @bluwy could you resolve the conflicts, let's get this one before the next patch 👍🏼

@bluwy bluwy dismissed stale reviews from sapphi-red and sodatea via 65edbee July 15, 2022 06:14
@bluwy
Copy link
Member Author

bluwy commented Jul 15, 2022

Resolved 👍

@patak-dev patak-dev merged commit ebf682e into main Jul 15, 2022
@patak-dev patak-dev deleted the fix-config-loader branch July 15, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-important Violate documented behavior or significantly improves performance (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vite.config.ts isn't transpiled when used with ts-node
4 participants