Skip to content

Commit

Permalink
fix: use devalue to handle runtime config (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Mar 29, 2022
1 parent cb03c96 commit 2522178
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rollup/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { dirname, join, relative, resolve } from 'pathe'
import type { InputOptions, OutputOptions } from 'rollup'
import defu from 'defu'
import devalue from '@nuxt/devalue'
import { terser } from 'rollup-plugin-terser'
import commonjs from '@rollup/plugin-commonjs'
import { nodeResolve } from '@rollup/plugin-node-resolve'
Expand Down Expand Up @@ -160,7 +161,7 @@ export const getRollupConfig = (nitro: Nitro) => {
// 'process.env.NUXT_STATIC_VERSION': JSON.stringify(nitro.options.staticAssets.version),
// 'process.env.NUXT_FULL_STATIC': nitro.options.fullStatic as unknown as string,
// 'process.env.NITRO_PRESET': JSON.stringify(nitro.options.preset),
'process.env.RUNTIME_CONFIG': JSON.stringify(nitro.options.runtimeConfig),
'process.env.RUNTIME_CONFIG': devalue(nitro.options.runtimeConfig),
'process.env.DEBUG': JSON.stringify(nitro.options.dev)
}
}))
Expand Down

0 comments on commit 2522178

Please sign in to comment.