Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v3.0] Rework file name patterns when preserving modules (#4565)
* Put preserveModules path into Chunk name * Use regular entryFileNames logic * Clarify documentation for `preserveModules` * Improve coverage * Improve wording in docs
- Loading branch information
1 parent
c779e74
commit ca14ee6
Showing
131 changed files
with
485 additions
and
253 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
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
12 changes: 0 additions & 12 deletions
12
...amples/deprecated/preserve-modules-filename-pattern/_expected/amd/entry-main-amd-ts.ts.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
...m/samples/deprecated/preserve-modules-filename-pattern/_expected/amd/main-amd-2ef83a76.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,12 @@ | ||
define(['exports', './foo-amd-0f9dc16c', './nested/bar-amd-f038b10c', './nested/baz-amd-d3de4cc0', './no-ext-amd-9d2c6ef6'], (function (exports, foo, bar, baz, noExt) { 'use strict'; | ||
|
||
|
||
|
||
exports.foo = foo; | ||
exports.bar = bar; | ||
exports.baz = baz; | ||
exports.noExt = noExt; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
})); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions
15
...amples/deprecated/preserve-modules-filename-pattern/_expected/cjs/entry-main-cjs-ts.ts.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
...m/samples/deprecated/preserve-modules-filename-pattern/_expected/cjs/main-cjs-82d6d41f.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,15 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
var foo = require('./foo-cjs-0d5774b5.js'); | ||
var bar = require('./nested/bar-cjs-abedc91d.js'); | ||
var baz = require('./nested/baz-cjs-4a9c02fc.js'); | ||
var noExt = require('./no-ext-cjs-500f8f81.js'); | ||
|
||
|
||
|
||
exports.foo = foo; | ||
exports.bar = bar; | ||
exports.baz = baz; | ||
exports.noExt = noExt; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions
4
.../samples/deprecated/preserve-modules-filename-pattern/_expected/es/entry-main-es-ts.ts.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
...orm/samples/deprecated/preserve-modules-filename-pattern/_expected/es/main-es-2d953d94.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,4 @@ | ||
export { default as foo } from './foo-es-3585f3eb.js'; | ||
export { default as bar } from './nested/bar-es-bd5e2ae1.js'; | ||
export { default as baz } from './nested/baz-es-a913ab4d.js'; | ||
export { default as noExt } from './no-ext-es-1f34b6e8.js'; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...xpected/system/entry-main-system-ts.ts.js → .../_expected/system/main-system-918bfec4.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 19 additions & 2 deletions
21
test/chunking-form/samples/preserve-modules-filename-pattern/_config.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
7 changes: 7 additions & 0 deletions
7
...unking-form/samples/preserve-modules-filename-pattern/_expected/amd/b.str-amd-f73e15b9.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,7 @@ | ||
define((function () { 'use strict'; | ||
|
||
var b = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; | ||
|
||
return b; | ||
|
||
})); |
4 changes: 2 additions & 2 deletions
4
...tern/_expected/amd/entry-foo-amd-ts.ts.js → ...e-pattern/_expected/amd/c-amd-c1bed163.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
define((function () { 'use strict'; | ||
|
||
var foo = 42; | ||
var c = 42; | ||
|
||
return foo; | ||
return c; | ||
|
||
})); |
4 changes: 2 additions & 2 deletions
4
...xpected/amd/nested/entry-bar-amd-ts.ts.js → ...e-pattern/_expected/amd/d-amd-f5c92c04.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
define((function () { 'use strict'; | ||
|
||
var bar = 'banana'; | ||
var d = 42; | ||
|
||
return bar; | ||
return d; | ||
|
||
})); |
4 changes: 2 additions & 2 deletions
4
...xpected/amd/nested/entry-baz-amd-ts.ts.js → ...e-pattern/_expected/amd/e-amd-f393b98d.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
define((function () { 'use strict'; | ||
|
||
var baz = 'whatever'; | ||
var e = 42; | ||
|
||
return baz; | ||
return e; | ||
|
||
})); |
Oops, something went wrong.