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
+1 -1
View File
@@ -27,7 +27,7 @@
"webpack": "^1.14.0", "webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2", "webpack-dev-server": "^1.16.2",
"webpack-fail-plugin": "^1.0.5", "webpack-fail-plugin": "^1.0.5",
"webpack-svgstore-plugin": "^2.2.2" "webpack-svgstore-plugin": "^3.0.6"
}, },
"dependencies": { "dependencies": {
"@angular/common": "2.3.1", "@angular/common": "2.3.1",
+3
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'; import { Injectable } from '@angular/core';
@Injectable() @Injectable()
+3 -11
View File
@@ -15,7 +15,7 @@ module.exports = {
devtool: 'source-map', devtool: 'source-map',
resolve: { resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'], extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
modules: [ path.join(rootDir, "node_modules") ] modules: [path.join(rootDir, "node_modules")]
}, },
module: { module: {
loaders: [ loaders: [
@@ -30,21 +30,13 @@ module.exports = {
}, },
plugins: [ plugins: [
// new webpack.optimize.UglifyJsPlugin({ minimize: true }) // new webpack.optimize.UglifyJsPlugin({ minimize: true })
new SvgStore( new SvgStore({
[
rootDir + '/images/icons/**/*.svg'
],
'./',
{
name: 'assets/compiled_sprite.svg',
chunk: 'app',
svgoOptions: { svgoOptions: {
plugins: [ plugins: [
{ removeTitle: true } { removeTitle: true }
] ]
} }
} }),
),
webpackFailPlugin, webpackFailPlugin,
new CopyWebpackPlugin([ new CopyWebpackPlugin([
{ from: './src/*.html', flatten: true }, { from: './src/*.html', flatten: true },