File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2521,6 +2521,7 @@ async function bundleConfigFile(
25212521 const importMetaResolveVarName =
25222522 '__vite_injected_original_import_meta_resolve'
25232523 const importMetaResolveRegex = / i m p o r t \. m e t a \s * \. \s * r e s o l v e /
2524+ const configFileRegex = / \. [ c m ] ? [ j t ] s $ /
25242525
25252526 const nativeIncompatibilities : NativeConfigIncompatibility [ ] = [ ]
25262527
@@ -2607,7 +2608,7 @@ async function bundleConfigFile(
26072608 {
26082609 name : 'inject-file-scope-variables' ,
26092610 transform : {
2610- filter : { id : / \. [ c m ] ? [ j t ] s $ / } ,
2611+ filter : { id : configFileRegex } ,
26112612 handler ( code , id ) {
26122613 let injectValues =
26132614 `const ${ dirnameVarName } = ${ JSON . stringify ( path . dirname ( id ) ) } ;` +
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ export function createNativeConfigCompatPlugin(
220220 transform : {
221221 filter : {
222222 id : {
223- include : / \. [ c m ] ? [ j t ] s x ? $ / ,
223+ include : jsTsExtRE ,
224224 // exclude rolldown runtime
225225 exclude : / ^ \0 / ,
226226 } ,
You can’t perform that action at this time.
0 commit comments