diff --git a/.dockerignore b/.dockerignore index d0221be9..34953d03 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,6 +15,7 @@ Dockerfile Dockerfile.alpine webpack.config.js +cssnano.config.js bin/release.js diff --git a/.npmignore b/.npmignore index cbc2ab26..7f7cd7e0 100644 --- a/.npmignore +++ b/.npmignore @@ -11,6 +11,7 @@ html yarn-error.log yarn.lock now.json +cssnano.config.js modules/jquery-mouse-wheel diff --git a/.webpack/css.js b/.webpack/css.js index 280d1107..49694282 100644 --- a/.webpack/css.js +++ b/.webpack/css.js @@ -30,7 +30,7 @@ const clean = (a) => a.filter(Boolean); const plugins = clean([ ...cssPlugins, extractMain, - !isDev && new OptimizeCssAssetsPlugin({}), + !isDev && new OptimizeCssAssetsPlugin(), ]); const rules = [{ diff --git a/cssnano.config.js b/cssnano.config.js new file mode 100644 index 00000000..b5b4d7b2 --- /dev/null +++ b/cssnano.config.js @@ -0,0 +1,15 @@ +'use strict'; + +// used by OptimizeCssAssetsPlugin + +const defaultPreset = require('cssnano-preset-default'); + +module.exports = defaultPreset({ + svgo: { + plugins: [ + {convertPathData: false}, + {convertShapeToPath: false}, + ] + } +}); + diff --git a/package.json b/package.json index 1ddd5a96..89a6ab5d 100644 --- a/package.json +++ b/package.json @@ -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",