-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(optimize-deps): don't externalize JS files imported with asset ex…
…tensions (#16242)
- Loading branch information
Showing
12 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
6 changes: 6 additions & 0 deletions
6
playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/index.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const { okay } = require('./test.okay') | ||
const { scss } = require('./test.scss') | ||
const { astro } = require('./test.astro') | ||
const { tsx } = require('./test.tsx') | ||
|
||
module.exports = { okay, scss, astro, tsx } |
6 changes: 6 additions & 0 deletions
6
playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/package.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@vitejs/test-dep-cjs-external-package-omit-js-suffix", | ||
"private": true, | ||
"version": "0.0.0", | ||
"main": "index.js" | ||
} |
5 changes: 5 additions & 0 deletions
5
playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/test.astro.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function astro() { | ||
return 'astro' | ||
} | ||
|
||
module.exports = { astro } |
5 changes: 5 additions & 0 deletions
5
playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/test.okay.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function okay() { | ||
return 'okay' | ||
} | ||
|
||
module.exports = { okay } |
5 changes: 5 additions & 0 deletions
5
playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/test.scss.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function scss() { | ||
return 'scss' | ||
} | ||
|
||
module.exports = { scss } |
5 changes: 5 additions & 0 deletions
5
playground/optimize-deps/dep-cjs-external-package-omit-js-suffix/test.tsx.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function tsx() { | ||
return 'tsx' | ||
} | ||
|
||
module.exports = { tsx } |
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.