This PR solve the issue of error during build. npx vite build --mode development.
The mode can be used for environment and not limited to the command build or serve. It can be mode=development but command is build. Switching the sequence should fix the issue.
However there will be another issue, if someone want to serve a production environment.
npx vite serve --mode production. For long term solution i would suggest to remove the mode from the condition statement.
error during build:
TypeError: [originjs:federation] Cannot read properties of undefined (reading 'config')
Description
This PR solve the issue of error during build.
npx vite build --mode development
.The
mode
can be used for environment and not limited to the commandbuild
orserve
. It can bemode=development
but command isbuild
. Switching the sequence should fix the issue.However there will be another issue, if someone want to serve a production environment.
npx vite serve --mode production
. For long term solution i would suggest to remove themode
from the condition statement.fixes #527 React: Cannot read properties of undefined (reading 'config') in devSharedScopeCode
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).