Dynamic import inside the package makes it difficult to consume
See original GitHub issueMy Excalidraw embed works in one Next project but breaks in another one:
It is very difficult to debug why webpack is attempting to load via non-root URL. I know that I’m supposed to adjust this via __webpack_public_path__
but that’s not super helpful since that can break other things.
I don’t have any great solutions but this is a pain point. It would be nice if there was some way to just force Excalidraw to load from a particular path, ignoring webpack variables. I would then hardcode it to root.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:18 (7 by maintainers)
Top Results From Across the Web
What are Dynamic Imports and how to use them? - Initialyze
Dynamic imports or Code Splitting is the practice of breaking up your JavaScript modules into smaller bundles and loading them dynamically ...
Read more >Dynamically Importing Components with React.lazy
First, as we saw, dynamic imports require your app to make additional network requests at run time to fetch those lazily loaded modules....
Read more >Dynamic import - import() - fails when the code is packaged ...
The reason seems to be that pkg must traverse all require()-calls in your program to know what exactly needs to be packaged together...
Read more >Webpack and Dynamic Imports: Doing it Right - Medium
But for this article, I'm going to use the proposed ES2015 dynamic ... This makes debugging harder, as I don't know if one...
Read more >Dynamic imports and code splitting with Next.js
This method creates multiple bundles that are dynamically loaded at the runtime of the webpage. Dynamic imports make use of import statements ...
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
closing this via #3068
Great, thanks!