mirror of
https://github.com/withastro/astro.git
synced 2025-08-26 16:53:44 +08:00
feat: remove the squoosh image service (#11770)
* feat: remove the squoosh image service * fix: build * chore: changeset
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user