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.

Add compiled dist version to npm package?

See original GitHub issue

Wondering whether to add a compiled ES5 version of the library which polyfills the global ResizeObserver on the window.

This makes it easier to integrate into older projects.

Would this be helpful?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
alejandroiglesiascommented, Jul 1, 2019

I just tried to use the library in our Meteor project and it fails because Meteor only transpiles app code, not libraries. It’s the only library I’ve had this issue with. I suggest releasing a dist/ directory on npm with the ES5 version and point the main key of the package.json file to this path (you can keep the module key as is). You can use UMD for this so that it can still be require’d without polluting the global window.

0reactions
TremayneChristcommented, Jul 15, 2019

v2.2.0 is now published in ES5

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding dist-tags to packages - npm Docs
Adding a dist-tag to a specific version of your package. On the command line, navigate to the root directory of your package.
Read more >
How can I publish an npm package with distribution files?
Currently when I run npm publish from my Git repository, it results in only the src folder being published. My package.json file looks...
Read more >
How to Create an npm Package Ready to Distribute - Bugfender
First, navigate to your library file path, the same path in which you placed your package. json , and use the command npm...
Read more >
How to make your own npm package with typescript
#Part 2: Adding typescript. Let's try adding typescript. To do this, we will use the typescript compiler to compile a directory of files...
Read more >
Best practices for creating a modern npm package - Snyk
In this tutorial, we're going to walk step by step through creating an npm package using modern best practices (as of 2022).
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