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.

Doesn't work when imported into a web pack bundle.

See original GitHub issue

Webpack is unable to deal with the implicit chunks in the dist/browser folder.

Possible solution - looking into using pkg.module

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sergiubologacommented, Apr 17, 2018

I am using create-react-app and I get the same issue.

I managed to make it work by importing the other chunks also, like this:

import JsonUrl from 'json-url'
import 'json-url/dist/browser/json-url-msgpack'
import 'json-url/dist/browser/json-url-lzw'
import 'json-url/dist/browser/json-url-lzma'
import 'json-url/dist/browser/json-url-lzstring'
import 'json-url/dist/browser/json-url-safe64'

Hope this helps other people until a fix is implemented.

0reactions
masotimecommented, May 16, 2019

Closing for now. Please re-open if the issue still persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack is not bundling a imported and used function
Therefore it is not visible in your entry.js , when you try to import it. ... Then your code will be able to...
Read more >
Module Methods - webpack
When using webpack to bundle your application, you can pick from a ... It is not possible to use a fully dynamic import...
Read more >
A Guide to Managing Webpack Dependencies - Toptal
A Guide to Managing Webpack Dependencies ... The Webpack module bundler processes JavaScript code and all static assets, such as stylesheets, images, and...
Read more >
[NOT RESOLVED] Built 'module' bundle errors with "require is ...
[webpack-cli] Error: For the selected environment is no default ESM chunk format available: ESM exports can be chosen when 'import()' is available. JSONP...
Read more >
WTF is a Webpack - What Problem Does It Solve?
All those files should then be brought together and translated into a single file, suitable for use in a web browser. Surprisingly, webpack...
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