Comments (9)
Fixed
from loadable-components.
is it technically different?
This will blow up a little with transpilation/cjs so what about moving responsibility to the end user
const App = extractor.importEntrypiont(await import('test entrypoint'))
// ^ everything under user control
from loadable-components.
Yeah that seems better.
from loadable-components.
const App = await extractor.importEntrypiont(‘test entrypoint', (entry) => import(entry)))
Maybe?
from loadable-components.
That will not be statically analyzeable. Not sure if there's a need, it's not analyzable right now, but why you might need such indirection?
Lets apply occam's razor here and cut what we don't have a good reason for.
from loadable-components.
Also a typo in the example (piont).
from loadable-components.
const App = await import(extractor.getEntrypointPath(‘testentrypoint'))
Is better perhaps.
from loadable-components.
requireEntrypoint seems to require all script assets up front, so should it import all too?
from loadable-components.
In the pull i added you can now do
const extractor = ChunkExtractor({ statsfile: 'loadable-stats.json', entrypoints: ['main'] })
await Promise.all(extractor.getAllScriptAssetsPaths().map(asset=>import(asset)))
const App = await import(extractor.getEntrypointPath('main'))
from loadable-components.
Related Issues (20)
- problem with redial HOT 2
- How to change referencing external styles to preload mode
- Fallback running even when component has previously loaded HOT 1
- 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
- Not working with latest @loadable/server & @loadable/babel-plugin `v5.16.0` version HOT 4
- 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.