2
0

🚑 (lp) Fix environment injection in landing page

This commit is contained in:
Baptiste Arnaud
2023-08-28 09:38:52 +02:00
parent 786e5cb582
commit 6dc9b28f7d
5 changed files with 25 additions and 38 deletions

View File

@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
import { configureRuntimeEnv } from 'next-runtime-env/build/configure.js'
module.exports = withBundleAnalyzer({
configureRuntimeEnv()
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['utils', 'models'],
async redirects() {
return [
@ -20,4 +20,6 @@ module.exports = withBundleAnalyzer({
},
]
},
})
}
export default nextConfig

View File

@ -27,7 +27,6 @@
"devDependencies": {
"@babel/core": "7.22.9",
"@chakra-ui/styled-system": "2.9.1",
"@next/bundle-analyzer": "13.4.9",
"@typebot.io/tsconfig": "workspace:*",
"@types/aos": "3.0.4",
"@types/node": "20.4.2",
@ -37,6 +36,8 @@
"dotenv-cli": "^7.2.1",
"eslint": "8.44.0",
"eslint-config-custom": "workspace:*",
"next-runtime-env": "^1.6.2",
"@typebot.io/env": "workspace:*",
"next-transpile-modules": "10.0.0",
"postcss": "8.4.26",
"prettier": "3.0.0",

View File

@ -20,6 +20,8 @@ class MyDocument extends Document {
{/* eslint-disable-next-line @next/next/no-css-tags */}
<link href="./styles/aos-noscript.css" rel="stylesheet" />
</noscript>
{/* eslint-disable-next-line @next/next/no-sync-scripts */}
<script src="/__ENV.js" />
</Head>
<body style={{ backgroundColor: '#171923' }}>
<ColorModeScript initialColorMode={theme.config.initialColorMode} />

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B