mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 00:55:25 +00:00
fix: dev server blowing up
This commit is contained in:
@@ -273,7 +273,7 @@ export default defineNuxtConfig({
|
|||||||
external: ['cloudflare:workers'],
|
external: ['cloudflare:workers'],
|
||||||
},
|
},
|
||||||
preset: 'cloudflare_module',
|
preset: 'cloudflare_module',
|
||||||
noExternals: true,
|
noExternals: getNoExternals(),
|
||||||
cloudflare: {
|
cloudflare: {
|
||||||
nodeCompat: true,
|
nodeCompat: true,
|
||||||
},
|
},
|
||||||
@@ -352,6 +352,15 @@ function isProduction() {
|
|||||||
return process.env.NODE_ENV === 'production'
|
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() {
|
function getFeatureFlagOverrides() {
|
||||||
return JSON.parse(process.env.FLAG_OVERRIDES ?? '{}')
|
return JSON.parse(process.env.FLAG_OVERRIDES ?? '{}')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user