mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 05:51:44 +03:00
fix: vercel opt
This commit is contained in:
1 parent
bcec4020a1
commit
95ed4e402b
1 file changed
+3
-2
+3
-2
@@ -116,6 +116,7 @@ export default defineConfig({
|
||||
'@babel/core': 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)),
|
||||
'webcrypto-liner-shim': !process.env.VERCEL ? 'webcrypto-liner-shim' : fileURLToPath(new URL('./src/_empty.ts', import.meta.url)),
|
||||
},
|
||||
},
|
||||
define: {
|
||||
@@ -132,7 +133,7 @@ export default defineConfig({
|
||||
// cssMinify: false,
|
||||
modulePreload: false,
|
||||
rollupOptions: {
|
||||
external: ['regex', './out/isolated_vm', 'isolated-vm', 'onnxruntime-node'],
|
||||
external: ['regex', './out/isolated_vm', 'isolated-vm', 'onnxruntime-node', ...(process.env.VERCEL ? ['webcrypto-liner-shim'] : [])],
|
||||
output: {
|
||||
format: 'es',
|
||||
manualChunks: (id) => {
|
||||
@@ -154,7 +155,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['isolated-vm', 'pdfjs-dist', 'onnxruntime-node'], // optionally specify dependency name
|
||||
include: ['isolated-vm', 'pdfjs-dist', 'onnxruntime-node', ...(process.env.VERCEL ? ['webcrypto-liner-shim'] : [])], // optionally specify dependency name
|
||||
esbuildOptions: {
|
||||
supported: {
|
||||
'top-level-await': true,
|
||||
|
||||
Reference in new issue
Block a user