Skip to content

Commit 62c858c

Browse files
filipesilvahansl
authored andcommitted
fix(@angular/cli): update file-loader and url-loader
This should fix errors like the one below for 0.6.0: ``` URL Loader Invalid Options options['name'] should NOT have additional properties options.limit should be number ```
1 parent 451f17c commit 62c858c

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

package-lock.json

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"enhanced-resolve": "^3.4.1",
5858
"exports-loader": "^0.6.3",
5959
"extract-text-webpack-plugin": "3.0.0",
60-
"file-loader": "^0.10.0",
60+
"file-loader": "^1.1.5",
6161
"fs-extra": "^4.0.0",
6262
"glob": "^7.0.3",
6363
"html-webpack-plugin": "^2.29.0",
@@ -92,7 +92,7 @@
9292
"tree-kill": "^1.0.0",
9393
"typescript": "~2.4.2",
9494
"uglifyjs-webpack-plugin": "1.0.0-beta.1",
95-
"url-loader": "^0.6.0",
95+
"url-loader": "^0.6.2",
9696
"webpack": "~3.7.1",
9797
"webpack-concat-plugin": "1.4.0",
9898
"webpack-dev-middleware": "~1.12.0",

packages/@angular/cli/models/webpack-configs/common.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,21 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
179179
module: {
180180
rules: [
181181
{ test: /\.html$/, loader: 'raw-loader' },
182-
{ test: /\.(eot|svg|cur)$/, loader: `file-loader?name=[name]${hashFormat.file}.[ext]` },
182+
{
183+
test: /\.(eot|svg|cur)$/,
184+
loader: 'file-loader',
185+
options: {
186+
name: `[name]${hashFormat.file}.[ext]`,
187+
limit: 10000
188+
}
189+
},
183190
{
184191
test: /\.(jpg|png|webp|gif|otf|ttf|woff|woff2|ani)$/,
185-
loader: `url-loader?name=[name]${hashFormat.file}.[ext]&limit=10000`
192+
loader: 'url-loader',
193+
options: {
194+
name: `[name]${hashFormat.file}`,
195+
limit: 10000
196+
}
186197
}
187198
].concat(extraRules)
188199
},

packages/@angular/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"ember-cli-string-utils": "^1.0.0",
4545
"exports-loader": "^0.6.3",
4646
"extract-text-webpack-plugin": "3.0.0",
47-
"file-loader": "^0.10.0",
47+
"file-loader": "^1.1.5",
4848
"fs-extra": "^4.0.0",
4949
"glob": "^7.0.3",
5050
"html-webpack-plugin": "^2.29.0",
@@ -75,7 +75,7 @@
7575
"stylus-loader": "^3.0.1",
7676
"typescript": ">=2.0.0 <2.6.0",
7777
"uglifyjs-webpack-plugin": "1.0.0-beta.1",
78-
"url-loader": "^0.6.0",
78+
"url-loader": "^0.6.2",
7979
"webpack": "~3.7.1",
8080
"webpack-concat-plugin": "1.4.0",
8181
"webpack-dev-middleware": "~1.12.0",

0 commit comments

Comments
 (0)