Skip to content

Commit defc269

Browse files
authored
chore(webpack): upgrade webpack to RC 3. (angular#3786)
Need to use before-resolve until webpack/webpack#3641 is fixed. Fixes angular#3581 Fixes angular#3660
1 parent 496c5e5 commit defc269

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"typescript": "~2.0.3",
116116
"url-loader": "^0.5.7",
117117
"walk-sync": "^0.2.6",
118-
"webpack": "2.1.0-beta.25",
118+
"webpack": "2.2.0-rc.3",
119119
"webpack-dev-server": "2.1.0-beta.9",
120120
"webpack-merge": "^0.14.0",
121121
"webpack-sources": "^0.1.3",

packages/@ngtools/webpack/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
"@angular/tsc-wrapped": "^0.5.0",
3838
"typescript": "^2.0.2",
3939
"reflect-metadata": "^0.1.8",
40-
"webpack": "^2.1.0-beta.25"
40+
"webpack": "2.2.0-rc.3"
4141
}
4242
}

packages/@ngtools/webpack/src/plugin.ts

+14-12
Original file line numberDiff line numberDiff line change
@@ -228,19 +228,21 @@ export class AotPlugin implements Tapable {
228228
cb();
229229
});
230230

231-
// Virtual file system.
232-
compiler.resolvers.normal.plugin('resolve', (request: any, cb?: (err?: any) => void) => {
233-
if (request.request.match(/\.ts$/)) {
234-
this.done.then(() => cb(), () => cb());
235-
} else {
236-
cb();
237-
}
231+
compiler.plugin('after-resolvers', (compiler: any) => {
232+
// Virtual file system.
233+
compiler.resolvers.normal.plugin('before-resolve', (request: any, cb: () => void) => {
234+
if (request.request.match(/\.ts$/)) {
235+
this.done.then(() => cb(), () => cb());
236+
} else {
237+
cb();
238+
}
239+
});
240+
compiler.resolvers.normal.apply(new PathsPlugin({
241+
tsConfigPath: this._tsConfigPath,
242+
compilerOptions: this._compilerOptions,
243+
compilerHost: this._compilerHost
244+
}));
238245
});
239-
compiler.resolvers.normal.apply(new PathsPlugin({
240-
tsConfigPath: this._tsConfigPath,
241-
compilerOptions: this._compilerOptions,
242-
compilerHost: this._compilerHost
243-
}));
244246
}
245247

246248
private _make(compilation: any, cb: (err?: any, request?: any) => void) {

packages/angular-cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"typescript": "~2.0.3",
9696
"url-loader": "^0.5.7",
9797
"walk-sync": "^0.2.6",
98-
"webpack": "2.1.0-beta.25",
98+
"webpack": "2.2.0-rc.3",
9999
"webpack-dev-server": "2.1.0-beta.9",
100100
"webpack-merge": "^0.14.0",
101101
"webpack-sources": "^0.1.3",

tests/e2e/assets/webpack/test-app-weird/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"raw-loader": "^0.5.1",
2323
"sass-loader": "^3.2.0",
2424
"typescript": "~2.0.3",
25-
"webpack": "2.1.0-beta.22"
25+
"webpack": "2.2.0-rc.3"
2626
}
2727
}

tests/e2e/assets/webpack/test-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"raw-loader": "^0.5.1",
2323
"sass-loader": "^3.2.0",
2424
"typescript": "~2.0.3",
25-
"webpack": "2.1.0-beta.25"
25+
"webpack": "2.2.0-rc.3"
2626
}
2727
}

0 commit comments

Comments
 (0)