Browse Source

Adds image optimization if folder is missing

main
Eric Amodio 6 years ago
parent
commit
4fc70396c7
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      webpack.config.js

+ 4
- 0
webpack.config.js View File

@ -18,6 +18,10 @@ module.exports = function(env, argv) {
env.optimizeImages = env.production || Boolean(env.optimizeImages); env.optimizeImages = env.production || Boolean(env.optimizeImages);
env.copyClipboardyFallbacks = env.production || Boolean(env.copyClipboardyFallbacks); env.copyClipboardyFallbacks = env.production || Boolean(env.copyClipboardyFallbacks);
if (!env.optimizeImages && !fs.existsSync(path.resolve(__dirname, 'images/settings'))) {
env.optimizeImages = true;
}
if (!env.copyClipboardyFallbacks && !fs.existsSync(path.resolve(__dirname, 'fallbacks'))) { if (!env.copyClipboardyFallbacks && !fs.existsSync(path.resolve(__dirname, 'fallbacks'))) {
env.copyClipboardyFallbacks = true; env.copyClipboardyFallbacks = true;
} }

Loading…
Cancel
Save