mirror of
https://github.com/modrinth/code.git
synced 2026-08-24 16:44:51 +00:00
fix: dev server blowing up
This commit is contained in:
@@ -273,7 +273,7 @@ export default defineNuxtConfig({
|
||||
external: ['cloudflare:workers'],
|
||||
},
|
||||
preset: 'cloudflare_module',
|
||||
noExternals: true,
|
||||
noExternals: getNoExternals(),
|
||||
cloudflare: {
|
||||
nodeCompat: true,
|
||||
},
|
||||
@@ -352,6 +352,15 @@ function isProduction() {
|
||||
return process.env.NODE_ENV === 'production'
|
||||
}
|
||||
|
||||
function getNoExternals() {
|
||||
if (process.env.NITRO_NO_EXTERNALS !== undefined) {
|
||||
return process.env.NITRO_NO_EXTERNALS === 'true'
|
||||
}
|
||||
|
||||
// bundling every dependency breaks the dev server, so only do it for real builds
|
||||
return isProduction()
|
||||
}
|
||||
|
||||
function getFeatureFlagOverrides() {
|
||||
return JSON.parse(process.env.FLAG_OVERRIDES ?? '{}')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user