Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// doesn't affect most use cases. for example lit-html handles it: (https://github.com/Polymer/lit-html/issues/575)
exclude: legacy ? undefined : ['@babel/plugin-transform-template-literals'],
useBuiltIns: false,
modules: false,
},
],
],
}),
// only minify if in production
production && terser(),
production &&
options.plugins.workbox &&
!legacy &&
generateSW(getWorkboxConfig(options.outputDir)),
],
};
}
{
targets: findSupportedBrowsers(),
// preset-env compiles template literals for safari 12 due to a small bug which
// doesn't affect most use cases. for example lit-html handles it: (https://github.com/Polymer/lit-html/issues/575)
exclude: ['@babel/plugin-transform-template-literals'],
useBuiltIns: false,
modules: false,
},
],
],
}),
// only minify if in production
production && terser(),
production && options.plugins.workbox && generateSW(getWorkboxConfig(options.outputDir)),
],
};
};
}
},
tsconfig: 'tsconfig.json',
objectHashIgnoreUnknownHack: true
}),
globals(),
builtins(),
...(DEVELOPMENT ? [] : [terser()]),
html({
template: template,
dest: output,
filename: 'index.html',
inject: 'head',
ignore: /worker/
}),
...(serviceWorker && !DEVELOPMENT ? [generateSW(serviceWorker)] : []),
copy({
targets: ['src/frontend/theme/assets', 'assets', ...extraAssets].map(src => ({ src, dest: output }))
}),
sizes()
],
onwarn: (warning, warn) => {
if (warning.code === 'EVAL' && warning.id.match(/thumbulator\.js$/)) return;
warn(warning);
}
});