diff --git a/docs/.vitepress/api/gh-icon/dpi/loadWasm.ts b/docs/.vitepress/api/gh-icon/dpi/loadWasm.ts index 2369e8941a..521b554942 100644 --- a/docs/.vitepress/api/gh-icon/dpi/loadWasm.ts +++ b/docs/.vitepress/api/gh-icon/dpi/loadWasm.ts @@ -1,6 +1,6 @@ import fs from 'fs'; import module from 'node:module'; -/* WASM_IMPORT */ +import resvg_wasm from '@resvg/resvg-wasm/index_bg.wasm'; let wasm; diff --git a/docs/nitro.config.ts b/docs/nitro.config.ts index f5a3e38fd9..a38a13523d 100644 --- a/docs/nitro.config.ts +++ b/docs/nitro.config.ts @@ -1,5 +1,5 @@ -import copy from 'rollup-plugin-copy'; -import replace from '@rollup/plugin-replace'; +// import copy from 'rollup-plugin-copy'; +// import replace from '@rollup/plugin-replace'; export default defineNitroConfig({ preset: 'vercel_edge', @@ -7,25 +7,25 @@ export default defineNitroConfig({ routeRules: { '/api/**': { cors: false }, }, - rollupConfig: { - external: ['@resvg/resvg-wasm/index_bg.wasm', './index_bg.wasm?module'], - plugins: [ - copy({ - targets: [ - { - src: './node_modules/@resvg/resvg-wasm/index_bg.wasm', - dest: './.vercel/output/functions/__nitro.func', - }, - ], - }), - replace({ - include: ['./**/*.ts'], - '/* WASM_IMPORT */': 'import resvg_wasm from "./index_bg.wasm?module";', - delimiters: ['', ''], - preventAssignment: false, - }), - ], - }, + // rollupConfig: { + // external: ['@resvg/resvg-wasm/index_bg.wasm', './index_bg.wasm?module'], + // plugins: [ + // copy({ + // targets: [ + // { + // src: './node_modules/@resvg/resvg-wasm/index_bg.wasm', + // dest: './.vercel/output/functions/__nitro.func', + // }, + // ], + // }), + // replace({ + // include: ['./**/*.ts'], + // '/* WASM_IMPORT */': 'import resvg_wasm from "./index_bg.wasm?module";', + // delimiters: ['', ''], + // preventAssignment: false, + // }), + // ], + // }, esbuild: { options: { jsxFactory: 'React.createElement',