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.

dist folder is published to npm

See original GitHub issue

Summary

I have noticed that npm package includes the dist folder which contains both minified and full versions of axios. At the same time, the npm package itself is only using the lib folder. Is there a reason to ship pre-built versions via npm in addition to the library itself? The duplication adds around 200KB and requires a workaround when packaging axios for the AWS Lambda.

Context

  • axios version: latest

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
OrKoNcommented, Aug 14, 2019

@fed135 this is actually backend for https://aws.amazon.com/lambda

I’d recommend to ship only one code version with the axios package suitable for Node (the lib + index.js). If someone needs the minified and concatenated versions for the browsers, those should be published as separate packages or it could be built by the end users at the build time.

1reaction
fed135commented, Aug 13, 2019

Hi, thanks for reporting this issue. It is something that I have been wondering myself. I’ll take a look into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I publish an npm package with distribution files?
I would like to publish a npm package that contains my source as well as distribution files. My GitHub repository contains src folder...
Read more >
Publishing from "dist" and missing package.json #128 - GitHub
Basically, I would like to publish to NPM only the DIST directory as this is where all my compiled files are.
Read more >
How to publish a npm package in four steps
A step by step tutorial on how to publish a package on npm using compact and idiomatic JavaScript. ... npm run build. You'll...
Read more >
npm-publish | npm Docs
Description. Publishes a package to the registry so that it can be installed by name. By default npm will publish to the public...
Read more >
How to make your own npm package with typescript
It just uses tsc is used to compile the files to the dist folder, and the dist folder is published to npm !...
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