You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Number of small changes was required for packages (components/hooks)
and for Next.js app to build properly.
* Next.js' config now includes "esmExternals: loose". In commit ee0a27f
"react-markdown" and "remark-gfm" were changed to use dynamic imports
to avoid errors. While this worked in deve mode, it still broke down
when running prebuilt app. This setting once again sweeps the problem
under the rug.
* Added @babel/runtime for packages/components to fix the build process
done by preconstruct.
* Renamed "types" fields in package.json of packages/components and
packages/hooks to use the names of the files actually generated when
the packages are built with preconstruct.
* In packages/components, import React in all files where it's used.
While this is not required by the IDE or Next.js dev server, they
will cause errors when built Next.js app tries to use the packages.
* In packages/components, import React in all files where it's used
directly, e.g. by calling "React.FC". Don't import React in files
that just use JSX elements, since that's not required anymore and
goes against our linting rules. However, for this to work the same
way consistently between the packages and the Next.js app using them,
"runtime: automatic" was added for "@babel/preset-react" setting.
0 commit comments