mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-23 06:11:06 +03:00
chore: optimize onnxruntime-node
This commit is contained in:
1 parent
8de053540a
commit
99f4f830bb
1 file changed
+3
-2
+3
-2
@@ -115,6 +115,7 @@ export default defineConfig({
|
|||||||
'fs': fileURLToPath(new URL('./src/_empty.ts', import.meta.url)),
|
'fs': fileURLToPath(new URL('./src/_empty.ts', import.meta.url)),
|
||||||
'@babel/core': fileURLToPath(new URL('./src/_empty.ts', import.meta.url)),
|
'@babel/core': fileURLToPath(new URL('./src/_empty.ts', import.meta.url)),
|
||||||
'isolated-vm': fileURLToPath(new URL('./src/_empty.ts', import.meta.url)),
|
'isolated-vm': fileURLToPath(new URL('./src/_empty.ts', import.meta.url)),
|
||||||
|
'onnxruntime-node': fileURLToPath(new URL('./src/_empty.ts', import.meta.url)),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
@@ -131,7 +132,7 @@ export default defineConfig({
|
|||||||
// cssMinify: false,
|
// cssMinify: false,
|
||||||
modulePreload: false,
|
modulePreload: false,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: ['regex', './out/isolated_vm', 'isolated-vm'],
|
external: ['regex', './out/isolated_vm', 'isolated-vm', 'onnxruntime-node'],
|
||||||
output: {
|
output: {
|
||||||
format: 'es',
|
format: 'es',
|
||||||
manualChunks: (id) => {
|
manualChunks: (id) => {
|
||||||
@@ -153,7 +154,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
include: ['isolated-vm', 'pdfjs-dist'], // optionally specify dependency name
|
include: ['isolated-vm', 'pdfjs-dist', 'onnxruntime-node'], // optionally specify dependency name
|
||||||
esbuildOptions: {
|
esbuildOptions: {
|
||||||
supported: {
|
supported: {
|
||||||
'top-level-await': true,
|
'top-level-await': true,
|
||||||
|
|||||||
Reference in new issue
Block a user