-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow [format] pattern for ID generation
- Loading branch information
Showing
17 changed files
with
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
description: 'filenames custom pattern', | ||
options: { | ||
input: ['main1.js', 'main2.js'], | ||
output: { | ||
entryFileNames: 'entry-[name]-[hash]-[format].js', | ||
chunkFileNames: 'chunk-[name]-[hash]-[format].js', | ||
}, | ||
}, | ||
}; |
14 changes: 14 additions & 0 deletions
14
test/chunking-form/samples/filenames-patterns/_expected/amd/chunk-main2-bff49b9a-amd.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,14 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
|
||
var dep = { x: 42 }; | ||
|
||
function log (x) { | ||
if (dep) { | ||
console.log(x); | ||
} | ||
} | ||
|
||
exports.dep = dep; | ||
exports.log = log; | ||
|
||
}); |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/filenames-patterns/_expected/amd/entry-main1-bad4fd49-amd.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 @@ | ||
define(['./chunk-main2-bff49b9a-amd.js'], function (main2) { 'use strict'; | ||
|
||
main2.log(main2.dep); | ||
|
||
}); |
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/filenames-patterns/_expected/amd/entry-main2-cc8b7fec-amd.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(['./chunk-main2-bff49b9a-amd.js'], function (main2) { 'use strict'; | ||
|
||
|
||
|
||
return main2.log; | ||
|
||
}); |
12 changes: 12 additions & 0 deletions
12
test/chunking-form/samples/filenames-patterns/_expected/cjs/chunk-main2-4b102ef6-cjs.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 @@ | ||
'use strict'; | ||
|
||
var dep = { x: 42 }; | ||
|
||
function log (x) { | ||
if (dep) { | ||
console.log(x); | ||
} | ||
} | ||
|
||
exports.dep = dep; | ||
exports.log = log; |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/filenames-patterns/_expected/cjs/entry-main1-0af20c04-cjs.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 @@ | ||
'use strict'; | ||
|
||
var main2 = require('./chunk-main2-4b102ef6-cjs.js'); | ||
|
||
main2.log(main2.dep); |
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/filenames-patterns/_expected/cjs/entry-main2-f433c6bb-cjs.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 @@ | ||
'use strict'; | ||
|
||
var main2 = require('./chunk-main2-4b102ef6-cjs.js'); | ||
|
||
|
||
|
||
module.exports = main2.log; |
9 changes: 9 additions & 0 deletions
9
test/chunking-form/samples/filenames-patterns/_expected/es/chunk-main2-e628225d-esm.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,9 @@ | ||
var dep = { x: 42 }; | ||
|
||
function log (x) { | ||
if (dep) { | ||
console.log(x); | ||
} | ||
} | ||
|
||
export { dep as a, log as b }; |
3 changes: 3 additions & 0 deletions
3
test/chunking-form/samples/filenames-patterns/_expected/es/entry-main1-1a6a749d-esm.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,3 @@ | ||
import { a as dep, b as log } from './chunk-main2-e628225d-esm.js'; | ||
|
||
log(dep); |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/filenames-patterns/_expected/es/entry-main2-137367cc-esm.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 @@ | ||
export { b as default } from './chunk-main2-e628225d-esm.js'; |
18 changes: 18 additions & 0 deletions
18
.../chunking-form/samples/filenames-patterns/_expected/system/chunk-main2-4b538eea-system.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,18 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
exports('b', log); | ||
|
||
var dep = exports('a', { x: 42 }); | ||
|
||
function log (x) { | ||
if (dep) { | ||
console.log(x); | ||
} | ||
} | ||
|
||
} | ||
}; | ||
}); |
15 changes: 15 additions & 0 deletions
15
.../chunking-form/samples/filenames-patterns/_expected/system/entry-main1-d020ac3e-system.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 @@ | ||
System.register(['./chunk-main2-4b538eea-system.js'], function (exports, module) { | ||
'use strict'; | ||
var dep, log; | ||
return { | ||
setters: [function (module) { | ||
dep = module.a; | ||
log = module.b; | ||
}], | ||
execute: function () { | ||
|
||
log(dep); | ||
|
||
} | ||
}; | ||
}); |
13 changes: 13 additions & 0 deletions
13
.../chunking-form/samples/filenames-patterns/_expected/system/entry-main2-e24445f6-system.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 @@ | ||
System.register(['./chunk-main2-4b538eea-system.js'], function (exports, module) { | ||
'use strict'; | ||
return { | ||
setters: [function (module) { | ||
exports('default', module.b); | ||
}], | ||
execute: function () { | ||
|
||
|
||
|
||
} | ||
}; | ||
}); |
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 @@ | ||
export default { x: 42 } |
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 @@ | ||
import dep from './dep.js'; | ||
import log from './main2.js'; | ||
|
||
log(dep); |
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 @@ | ||
import dep from './dep.js'; | ||
|
||
export default function log (x) { | ||
if (dep) { | ||
console.log(x); | ||
} | ||
} |