2
0

🔒 Use isolated-vm

This commit is contained in:
Baptiste Arnaud
2024-05-22 11:42:31 +02:00
parent 15b2901f8a
commit 8d66b52a39
14 changed files with 310 additions and 114 deletions

View File

@ -50,21 +50,14 @@ const nextConfig = {
output: 'standalone',
experimental: {
outputFileTracingRoot: join(__dirname, '../../'),
serverComponentsExternalPackages: ['isolated-vm'],
},
webpack: (config, { nextRuntime }) => {
if (nextRuntime === 'nodejs') return config
webpack: (config, { isServer }) => {
if (isServer) return config
if (nextRuntime === 'edge') {
config.resolve.alias['minio'] = false
config.resolve.alias['got'] = false
config.resolve.alias['qrcode'] = false
return config
}
// These packages are imports from the integrations definition files that can be ignored for the client.
config.resolve.alias['minio'] = false
config.resolve.alias['got'] = false
config.resolve.alias['openai'] = false
config.resolve.alias['qrcode'] = false
config.resolve.alias['isolated-vm'] = false
return config
},
async redirects() {