-
-
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: do not append version query param when scanning for dependencies (…
- Loading branch information
Showing
10 changed files
with
63 additions
and
1 deletion.
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
13 changes: 13 additions & 0 deletions
13
playground/optimize-deps/dep-alias-using-absolute-path/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,13 @@ | ||
// Importing a shared dependency used by other modules, | ||
// so dependency optimizer creates a common chunk. | ||
// This is used to setup a test scenario, where dep scanner | ||
// could not determine all of the used dependencies on first | ||
// pass, e.g., a dependency that is aliased using an absolute | ||
// path, in which case it used to trigger unnecessary "full | ||
// reloads" invalidating all modules in a module graph. | ||
const cloneDeep = require('lodash/cloneDeep') | ||
|
||
// no-op, using imported module for sake of completeness | ||
module.exports = cloneDeep({ | ||
message: 'From dep-alias-using-absolute-path', | ||
}).message |
9 changes: 9 additions & 0 deletions
9
playground/optimize-deps/dep-alias-using-absolute-path/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,9 @@ | ||
{ | ||
"name": "@vitejs/test-dep-alias-using-absolute-path", | ||
"private": true, | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"dependencies": { | ||
"lodash": "^4.17.21" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
playground/optimize-deps/dynamic-use-dep-alias-using-absolute-path.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 @@ | ||
// This is used to setup a test scenario, where dep scanner | ||
// could not determine all of the used dependencies on first | ||
// pass, e.g., a dependency that is aliased using an absolute | ||
// path, in which case it used to trigger unnecessary "full | ||
// reloads" invalidating all modules in a module graph. | ||
export { default } from '@vitejs/test-dep-alias-using-absolute-path' |
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
File renamed without changes.
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.