Update webpack-svgstore-plugin to 3.x.x

Closes #119
This commit is contained in:
Farkas József
2016-12-16 23:02:44 +01:00
parent 35e0a45a30
commit dca2475217
3 changed files with 11 additions and 16 deletions

View File

@@ -27,7 +27,7 @@
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2",
"webpack-fail-plugin": "^1.0.5",
"webpack-svgstore-plugin": "^2.2.2"
"webpack-svgstore-plugin": "^3.0.6"
},
"dependencies": {
"@angular/common": "2.3.1",

View File

@@ -1,3 +1,6 @@
const svgIcons = { path: '../../images/icons/**/*.svg', name: 'assets/compiled_sprite.svg' };
require('webpack-svgstore-plugin/src/helpers/svgxhr')(svgIcons);
import { Injectable } from '@angular/core';
@Injectable()

View File

@@ -15,7 +15,7 @@ module.exports = {
devtool: 'source-map',
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
modules: [ path.join(rootDir, "node_modules") ]
modules: [path.join(rootDir, "node_modules")]
},
module: {
loaders: [
@@ -30,21 +30,13 @@ module.exports = {
},
plugins: [
// new webpack.optimize.UglifyJsPlugin({ minimize: true })
new SvgStore(
[
rootDir + '/images/icons/**/*.svg'
],
'./',
{
name: 'assets/compiled_sprite.svg',
chunk: 'app',
svgoOptions: {
plugins: [
{ removeTitle: true }
]
}
new SvgStore({
svgoOptions: {
plugins: [
{ removeTitle: true }
]
}
),
}),
webpackFailPlugin,
new CopyWebpackPlugin([
{ from: './src/*.html', flatten: true },