fix(img) loading: svg minify

This commit is contained in:
coderaiser 2018-07-18 12:11:56 +03:00
parent e034f7c1b6
commit 0e14b02109
5 changed files with 19 additions and 2 deletions

View file

@ -15,6 +15,7 @@ Dockerfile
Dockerfile.alpine
webpack.config.js
cssnano.config.js
bin/release.js

View file

@ -11,6 +11,7 @@ html
yarn-error.log
yarn.lock
now.json
cssnano.config.js
modules/jquery-mouse-wheel

View file

@ -30,7 +30,7 @@ const clean = (a) => a.filter(Boolean);
const plugins = clean([
...cssPlugins,
extractMain,
!isDev && new OptimizeCssAssetsPlugin({}),
!isDev && new OptimizeCssAssetsPlugin(),
]);
const rules = [{

15
cssnano.config.js Normal file
View file

@ -0,0 +1,15 @@
'use strict';
// used by OptimizeCssAssetsPlugin
const defaultPreset = require('cssnano-preset-default');
module.exports = defaultPreset({
svgo: {
plugins: [
{convertPathData: false},
{convertShapeToPath: false},
]
}
});

View file

@ -40,7 +40,7 @@
},
"config": {
"dirs": "bin/cloudcmd.js common server",
"dirs_test": "test bin/release.js webpack.config.js .webpack"
"dirs_test": "test bin/release.js webpack.config.js cssnano.config.js .webpack"
},
"scripts": {
"start": "node bin/cloudcmd.js",