@@ -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",
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -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({
|
||||||
[
|
svgoOptions: {
|
||||||
rootDir + '/images/icons/**/*.svg'
|
plugins: [
|
||||||
],
|
{ removeTitle: true }
|
||||||
'./',
|
]
|
||||||
{
|
|
||||||
name: 'assets/compiled_sprite.svg',
|
|
||||||
chunk: 'app',
|
|
||||||
svgoOptions: {
|
|
||||||
plugins: [
|
|
||||||
{ removeTitle: true }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
),
|
}),
|
||||||
webpackFailPlugin,
|
webpackFailPlugin,
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin([
|
||||||
{ from: './src/*.html', flatten: true },
|
{ from: './src/*.html', flatten: true },
|
||||||
|
|||||||
Reference in New Issue
Block a user