question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic import inside the package makes it difficult to consume

See original GitHub issue

My Excalidraw embed works in one Next project but breaks in another one:

Screenshot 2021-02-12 at 04 42 40

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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ad1992commented, Feb 21, 2021

closing this via #3068

1reaction
gaearoncommented, Feb 22, 2021

Great, thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found