feat: remove the squoosh image service (#11770)

* feat: remove the squoosh image service

* fix: build

* chore: changeset
This commit is contained in:
Erika
2024-08-20 15:12:48 +02:00
committed by GitHub
parent 787fed8504
commit cfa6a47ac7
60 changed files with 30 additions and 12922 deletions

View File

@ -65,16 +65,6 @@ export default async function build(...args) {
await clean(outdir);
}
const copyPlugin = copyWASM
? copy({
resolveFrom: 'cwd',
assets: {
from: ['./src/assets/services/vendor/squoosh/**/*.wasm'],
to: ['./dist/assets/services/vendor/squoosh'],
},
})
: null;
if (!isDev) {
await esbuild.build({
...config,
@ -83,8 +73,7 @@ export default async function build(...args) {
entryPoints,
outdir,
outExtension: forceCJS ? { '.js': '.cjs' } : {},
format,
plugins: [copyPlugin].filter(Boolean),
format
});
return;
}
@ -117,7 +106,7 @@ export default async function build(...args) {
outdir,
format,
sourcemap: 'linked',
plugins: [rebuildPlugin, copyPlugin].filter(Boolean),
plugins: [rebuildPlugin],
});
await builder.watch();