You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
542 B
15 lines
542 B
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
// Create public/wasm directory if it doesn't exist
|
|
const wasmDir = path.join(__dirname, '../public/wasm');
|
|
if (!fs.existsSync(wasmDir)) {
|
|
fs.mkdirSync(wasmDir, { recursive: true });
|
|
}
|
|
|
|
// Copy the WASM file from node_modules to public/wasm
|
|
const sourceFile = path.join(__dirname, '../node_modules/@jlongster/sql.js/dist/sql-wasm.wasm');
|
|
const targetFile = path.join(wasmDir, 'sql-wasm.wasm');
|
|
|
|
fs.copyFileSync(sourceFile, targetFile);
|
|
console.log('WASM file copied successfully!');
|