Skip to content

Commit

Permalink
fix(build): fix environment variable undefined error when building (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
simonguo committed Dec 22, 2023
1 parent f3a9773 commit 8efa27b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
8 changes: 7 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ module.exports = (api, options) => {
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-export-default-from',
['@babel/plugin-transform-runtime', { useESModules: !modules }]
['@babel/plugin-transform-runtime', { useESModules: !modules }],
[
'transform-inline-environment-variables',
{
include: ['RUN_ENV']
}
]
];

return {
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"babel-plugin-istanbul": "^4.1.4",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-dev": "^2.0.1",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"boxen": "^7.1.0",
"brfs": "^1.6.1",
"chai": "^4.3.5",
Expand Down

1 comment on commit 8efa27b

@vercel
Copy link

@vercel vercel bot commented on 8efa27b Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rsuite-nextjs – ./docs

rsuite-nextjs-rsuite.vercel.app
rsuitejs.com
rsuite.vercel.app
rsuite-nextjs-git-main-rsuite.vercel.app

Please sign in to comment.