removing the duplicated lib/*.wasm files

This commit is contained in:
Tony Sullivan 2022-09-12 16:23:39 -05:00
parent b00776c02f
commit e6e375cceb
12 changed files with 3 additions and 6 deletions

View file

@ -46,7 +46,7 @@ export async function processBuffer(
}
export async function copyLibFiles(dir: URL) {
const src = new URL('../../../lib/', import.meta.url);
const src = new URL('./', import.meta.url);
await copyLibDir(fileURLToPath(src), fileURLToPath(dir));
}
@ -56,7 +56,7 @@ async function copyLibDir(src: string, dest: string) {
const srcPath = path.join(src, srcName);
const destPath = path.join(dest, srcName);
const s = await fs.stat(srcPath);
if (s.isFile()) {
if (s.isFile() && /.wasm$/.test(srcPath)) {
await fs.mkdir(path.dirname(destPath), { recursive: true });
await fs.copyFile(srcPath, destPath);
}

View file

@ -1,11 +1,8 @@
import { defineConfig } from 'astro/config';
import image from '@astrojs/image';
import node from '@astrojs/node';
// https://astro.build/config
export default defineConfig({
site: 'http://localhost:3000',
integrations: [image({ logLevel: 'silent' })],
output: 'server',
adapter: node()
integrations: [image({ logLevel: 'silent' })]
});