diff --git a/.changeset/fair-ants-deny.md b/.changeset/fair-ants-deny.md new file mode 100644 index 000000000..de9402ebd --- /dev/null +++ b/.changeset/fair-ants-deny.md @@ -0,0 +1,5 @@ +--- +'preact-cli': patch +--- + +No longer copies 'sw-debug.js' to output directory on prod builds. No functional changes, as it was not used. diff --git a/packages/cli/lib/lib/webpack/webpack-client-config.js b/packages/cli/lib/lib/webpack/webpack-client-config.js index 2add797cf..a390d3bf7 100644 --- a/packages/cli/lib/lib/webpack/webpack-client-config.js +++ b/packages/cli/lib/lib/webpack/webpack-client-config.js @@ -92,7 +92,7 @@ async function clientConfig(env) { // copy any static files existsSync(source('assets')) && { from: 'assets', to: 'assets' }, // copy sw-debug - { + !isProd && { from: resolve(__dirname, '../../resources/sw-debug.js'), to: 'sw-debug.js', }, diff --git a/packages/cli/tests/images/build.js b/packages/cli/tests/images/build.js index 0d6f311f7..afd1fcb91 100644 --- a/packages/cli/tests/images/build.js +++ b/packages/cli/tests/images/build.js @@ -30,7 +30,6 @@ exports.default = exports.full = Object.assign({}, common, { 'ssr-build/ssr-bundle.6e806.css.map': 1250, 'ssr-build/ssr-bundle.js': 9976, 'ssr-build/ssr-bundle.js.map': 30887, - 'sw-debug.js': 775, }); exports['default-esm'] = exports.full = Object.assign({}, exports.default, { 'bundle.*.esm.js': 21135,