Comments (4)
@loadable/[email protected]
should fix the problem
from loadable-components.
@theKashey small update I think the issue is actually only with @loadable/babel-plugin
.
And based on git commits I think the issue might be in isValidIdentifier
function. But I have no expertise in writing babel plugins so I might be wrong.
I believe the problem is in the final return statement where we use loadableImportSpecifiers.find
So this:
function isValidIdentifier(path, loadableImportSpecifiers, lazyImportSpecifier) {
...
return (
path.get('callee').isMemberExpression() &&
loadableImportSpecifiers.find(specifier => path.get('callee.object').isIdentifier({ name: specifier })) &&
path.get('callee.property').isIdentifier({ name: 'lib' })
)
}
should probably be this:
function isValidIdentifier(path, loadableImportSpecifiers, lazyImportSpecifier) {
...
return (
path.get('callee').isMemberExpression() &&
loadableImportSpecifiers.every(specifier => path.get('callee.object').isIdentifier({ name: specifier })) &&
path.get('callee.property').isIdentifier({ name: 'lib' })
)
}
from loadable-components.
Thank you for the insight, that would greatly simply the fix process. @denchiklut +++
from loadable-components.
Root cause - broken "loadable" detection
In your code you just import your stuff as loadable
, and that's it - https://github.com/denchiklut/ssr-boilerplate/blob/414ff83dc991d59e75db92a031f55b279ee19c15/src/client/components/%40shared/app/routes/index.tsx#L7
"Signatures" broken this moment requiring an explicit configuration, which you should want to implement (😉)
In any case, no breaking changes should occur even for not very widely used functionality and the behaviour has been corrected.
Currently it's too late to perform release, I'll do it tomorrow morning (and time zones are hard)
from loadable-components.
Related Issues (20)
- lazy typescript definition missing options argument: Expected 1 argument, but got 2 HOT 2
- Can't get `fallback` to display component HOT 3
- What is the best way to prevent failure to load component or catch properly? HOT 7
- getting Uncaught TypeError: Failed to resolve module specifier HOT 1
- loadable/component Synchronously Load Component Failed with Error "Cannot convert undefined or null to object HOT 2
- SassError: Undefined variable HOT 1
- Inline Chunk injection HOT 2
- How to lazyload a hook? HOT 3
- Fallback behaviour HOT 1
- Main.js is rendered on every page even if I splitted each page into chunks with @loadable/component
- error in ./node_modules/@loadable/component/dist/loadable.esm.mjs HOT 9
- Why ChunkExtractor is required? HOT 3
- Is website sync with repo?
- If I am using react18, do I still need loadable-components HOT 6
- Add esbuild support HOT 3
- react-native-web SSR support HOT 1
- Loading state is always true on first render HOT 3
- Add query parameter support HOT 3
- SSR is broken for component v5.16.2+ HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loadable-components.