Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fair-ants-deny.md
Original file line number Diff line number Diff line change
@@ -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.
12 changes: 4 additions & 8 deletions packages/cli/lib/lib/webpack/webpack-client-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down Expand Up @@ -120,13 +120,9 @@ function getBabelEsmPlugin(config) {
beforeStartExecution: (plugins, newConfig) => {
const babelPlugins = newConfig.plugins;
newConfig.plugins = babelPlugins.filter(plugin => {
if (
Array.isArray(plugin) &&
plugin[0].indexOf('fast-async') !== -1
) {
return false;
}
return true;
return !(
Array.isArray(plugin) && plugin[0].indexOf('fast-async') !== -1
);
});
plugins.forEach(plugin => {
if (
Expand Down