mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
Generate image sprites
This commit is contained in:
parent
7b2244efcd
commit
fb0c697088
@ -62,6 +62,7 @@
|
||||
"yarn": "^1.21.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@a2nt/image-sprite-webpack-plugin": "^0.2.5",
|
||||
"autoprefixer": "^7.2.5",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-eslint": "^8.2.6",
|
||||
|
@ -12,6 +12,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
const ImageminPlugin = require('imagemin-webpack');
|
||||
const ImageSpritePlugin = require('@a2nt/image-sprite-webpack-plugin');
|
||||
|
||||
const plugins = [
|
||||
new webpack.DefinePlugin({
|
||||
@ -89,6 +90,20 @@ if (COMPRESS) {
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
plugins.push(
|
||||
new ImageSpritePlugin({
|
||||
exclude: /exclude|original|default-|icons|sprite/,
|
||||
commentOrigin: false,
|
||||
compress: true,
|
||||
extensions: ['png'],
|
||||
indent: '',
|
||||
log: true,
|
||||
//outputPath: path.join(__dirname, conf.APPDIR, conf.DIST),
|
||||
outputFilename: 'img/sprite-[hash].png',
|
||||
padding: 0,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
const includes = {};
|
||||
|
Loading…
Reference in New Issue
Block a user