feat: supports cts and mts config#8729
Merged
patak-cat merged 5 commits intovitejs:mainfrom Jun 24, 2022
sxzz:feat/config-ext
Merged
feat: supports cts and mts config#8729patak-cat merged 5 commits intovitejs:mainfrom sxzz:feat/config-ext
patak-cat merged 5 commits intovitejs:mainfrom
sxzz:feat/config-ext
Conversation
✅ Deploy Preview for vite-docs-main ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
4 tasks
This comment was marked as outdated.
This comment was marked as outdated.
poyoho
reviewed
Jun 24, 2022
poyoho
previously approved these changes
Jun 24, 2022
sapphi-red
reviewed
Jun 24, 2022
sapphi-red
reviewed
Jun 24, 2022
Member
There was a problem hiding this comment.
I noticed this filter needs to be /\.[mc]?[jt]s$/ now.
vite/packages/vite/src/node/config.ts
Line 959 in 9d16253
For example, this code does not work.
// vite.config.mts
import { u } from './foo.mjs'
console.log(u) // expected: 'file://path/to/foo.mjs', actual: `ReferenceError: __vite_injected_original_import_meta_url is not defined`
// foo.mjs
export const u = import.meta.url
Member
Author
|
@sapphi-red |
poyoho
approved these changes
Jun 24, 2022
Member
Author
|
Can I backport this feature to 2.x branch? |
9 tasks
4 tasks
haoqunjiang
added a commit
to haoqunjiang/cypress
that referenced
this pull request
Jul 14, 2022
It's added in Vite 3.0: vitejs/vite#8729
astone123
pushed a commit
to cypress-io/cypress
that referenced
this pull request
Jul 15, 2022
It's added in Vite 3.0: vitejs/vite#8729
|
I don’t think this fully addresses #5201—this only supports |
Member
|
Yeah looks like this covers config files only. We should support source files too. Re-opening the issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Support
mts/cts/cjsconfig filescloses #5201
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).