Typescript + SSR after build throws error: "loadable: SSR requires `@loadable/babel`, please install it"
See original GitHub issueI’ve scoped down my project into the following: https://github.com/krishnaglick/prod-build-test
Running the server with yarn start
works fine, but if I build and run (yarn serve
) then the error shows up. Any insight would be appreciated as to why things are working correctly within typescript, but not built-javascript.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:18 (2 by maintainers)
Top Results From Across the Web
Typescript + SSR after build throws error: "loadable ... - GitHub
I have issue both with only babel-loader (babel-typescript preset) and with ts-loader + babel-loader.
Read more >SSR requires `@loadable/babel-plugin`, please install it ...
I'm using the loadable component in a ReactJS project. For SSR but I get the following error when I run start command, I...
Read more >Server Side Rendering - Loadable Components
1. Install @loadable/babel-plugin .babelrc. { · 2. Install @loadable/webpack-plugin. webpack.config.js · 3. Setup ChunkExtractor server-side. import { ...
Read more >Server-Side Rendering - Vite
Building for Production To ship an SSR project for production, we need to: Produce a client build as normal; Produce an SSR build,...
Read more >@loadable/babel-plugin | Yarn - Package Manager
This plugin is required only if you use Server Side Rendering in your application. See @loadable/server for more information. Install. npm install --save-dev...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to solve the issue. The problem was my wrapper for
loadable
function. In order to fix this issue I needed to add Magic Comment.I was able to get this issue solved by setting JSX within my server’s tsconfig build to
preserve
, and targetingesnext
. I’m going to close this now but pings are welcome if someone gets stuck along a similar vein.