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
I am using serverless to deploy a React app. When I use loadable for code splitting everything is fine until I try to prefretch resources. Adding /* webpackPrefetch: true */ causes a server side crash on importing my < App >
TypeError: Cannot read property '__esModule' of undefined
at /Users/alexgawley/code/serverless/tmp/loadable-repro/.webpack/service/src/servers/static.js:29310:34
at Object.<anonymous> (/Users/alexgawley/code/serverless/tmp/loadable-repro/.webpack/service/src/servers/static.js:29312:12)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /Users/alexgawley/code/serverless/tmp/loadable-repro/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:157:133
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async InProcessRunner.run (/Users/alexgawley/code/serverless/tmp/loadable-repro/node_modules/serverless-offline/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js:157:9)
To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/agawley/loadable-repro
npm i
npm run offline
The page should load with a 'show/hide' link which reveals the lazy-loaded component SomeText. If you remove the /* webpackPrefetch: true */ comment from app.js you get the expected behaviour (but no prefetching!)
Hey @agawley 馃憢,
Thank you for opening an issue. We'll get back to you as soon as we can.
Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers.
If you use Loadable at work, you can also ask your company to sponsor us 鉂わ笍.
Hiya. Does anyone have any ideas on this? Another couple of days of debugging hasn't helped. I'm pretty sure this is going to be something whacky to do with my having two different webpack configs, but I can't for the life of me figure out what. Thanks!
馃悰 Bug Report
I am using serverless to deploy a React app. When I use loadable for code splitting everything is fine until I try to prefretch resources. Adding /* webpackPrefetch: true */ causes a server side crash on importing my < App >
To Reproduce
Steps to reproduce the behavior:
load http://localhost:3000
Expected behavior
The page should load with a 'show/hide' link which reveals the lazy-loaded component SomeText. If you remove the /* webpackPrefetch: true */ comment from app.js you get the expected behaviour (but no prefetching!)
Link to repl or repo (highly encouraged)
https://github.com/agawley/loadable-repro
Please provide a minimal repository on GitHub.
https://github.com/agawley/loadable-repro
Issues without a reproduction link are likely to stall.
Run
npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard
Paste the results here:
The text was updated successfully, but these errors were encountered: