Skip to content

Commit 925f47f

Browse files
In Angular2Spa, use css-loader so you can reference external images from CSS files, etc.
1 parent 80343e9 commit 925f47f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎templates/Angular2Spa/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"raw-loader": "^0.5.1",
3131
"rxjs": "5.0.0-beta.12",
3232
"style-loader": "^0.13.0",
33+
"to-string-loader": "^1.1.5",
3334
"ts-loader": "^0.8.2",
3435
"typescript": "^2.0.0",
3536
"url-loader": "^0.5.7",

‎templates/Angular2Spa/webpack.config.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ module.exports ={
1111
loaders: [
1212
{test: /\.ts$/,include: /ClientApp/,loader: 'ts',query: {silent: true}},
1313
{test: /\.html$/,include: /ClientApp/,loader: 'raw'},
14-
{test: /\.css/,include: /ClientApp/,loader: 'raw'}
14+
{test: /\.css/,include: /ClientApp/,loader: 'to-string!css'},
15+
{test: /\.(png|jpg|jpeg|gif|svg)$/,loader: 'url',query: {limit: 25000}}
1516
]
1617
},
1718
output: {

0 commit comments

Comments
(0)