@@ -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",
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user