loadable-components: Not getting chunks SSR
Hi, got a problem here.
Using ssr with ts-node ts server, and not getting any loadable chunks. Getting this in extactor:
get -> scriptTags <script>window.__LOADABLE_REQUIRED_CHUNKS__ = [];</script>
<script async data-chunk="app" src="/bundle.app.js"></script>
get -> linkTags <link data-chunk="app" rel="preload" as="script" href="/bundle.app.js">
get -> scriptTags <script>window.__LOADABLE_REQUIRED_CHUNKS__ = [];</script>
<script async data-chunk="app" src="/bundle.app.js"></script>
get -> linkTags <link data-chunk="app" rel="preload" as="script" href="/bundle.app.js">
but app loads fine and loadable components load fine too.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (14 by maintainers)
@bertho-zero the context is exposed (https://github.com/smooth-code/loadable-components/blob/master/packages/component/src/index.js#L16), if you want to use it, you can use it, you will not be fired 😉.
I understand your issue. Be careful of building your app correctly, server-side modules must be externals. I think we should document it. See https://github.com/smooth-code/loadable-components/blob/master/examples/server-side-rendering/webpack.config.babel.js#L40
I created an issue: https://github.com/smooth-code/loadable-components/issues/231