File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -91,10 +91,10 @@ export function serve(
91
91
modulesFolder,
92
92
homeDir,
93
93
cache,
94
- output : `${ browserOutput } /$name-$hash.js` ,
94
+ hash : isProdBuild ,
95
+ output : `${ browserOutput } /$name.js` ,
95
96
target : 'browser@es5' ,
96
97
useTypescriptCompiler : true ,
97
- hash : isProdBuild ,
98
98
plugins : [
99
99
isAotBuild && NgAotFactoryPlugin ( ) ,
100
100
isAotBuild &&
@@ -107,7 +107,7 @@ export function serve(
107
107
Ng2TemplatePlugin ( ) ,
108
108
[ '*.component.html' , RawPlugin ( ) ] ,
109
109
WebIndexPlugin ( {
110
- bundles : [ 'app ' , 'vendor ' ] ,
110
+ bundles : [ 'vendor ' , 'app ' ] ,
111
111
path : 'js' ,
112
112
target : '../index.html' ,
113
113
template : resolve ( 'src/app/index.pug' ) ,
Original file line number Diff line number Diff line change @@ -40,23 +40,21 @@ export class CompressionPluginClass implements Plugin {
40
40
Array . from ( producer . bundles )
41
41
. map ( bundle => bundle [ 1 ] . context . output )
42
42
. map ( bundleOutput => {
43
- return readFile_ (
44
- `${ bundleOutput . dir } /${ bundleOutput . filename } .js`
45
- ) . pipe (
43
+ return readFile_ ( bundleOutput . lastWrittenPath ) . pipe (
46
44
flatMap ( file => {
47
45
return forkJoin ( [
48
46
gzip_ ( file , { level : 9 } ) . pipe (
49
47
flatMap ( compressed =>
50
48
bundleOutput . writeToOutputFolder (
51
- `${ bundleOutput . filename } .js .gzip` ,
49
+ `${ bundleOutput . lastGeneratedFileName } .gzip` ,
52
50
compressed
53
51
)
54
52
)
55
53
) ,
56
54
brotli_ ( file ) . pipe (
57
55
flatMap ( compressed =>
58
56
bundleOutput . writeToOutputFolder (
59
- `${ bundleOutput . filename } .js .br` ,
57
+ `${ bundleOutput . lastGeneratedFileName } .br` ,
60
58
compressed
61
59
)
62
60
)
You can’t perform that action at this time.
0 commit comments