Skip to content

Reduce npm package size - #7

Merged
7rulnik merged 6 commits into
7rulnik:patch-0.6.1from
ai:smaller-npm
Nov 4, 2021
Merged

7rulnik merged 6 commits into
7rulnik:patch-0.6.1from
ai:smaller-npm

Conversation

@ai

@ai ai commented Oct 6, 2021

Copy link
Copy Markdown

This change reduces source-map-js footprint in node_modules from 700 KB (!) to 100 KB.

Now, source-map-js is 77% of installing size of PostCSS 😓.

  • Remove dist/ with webpack pre-build. Use case for pre-build is very limited and can be easily replaced by webpack on user’s side. For instance, most of my open source doesn’t have pre-build files.
  • Remove long API docs from README.md in npm package by clean-publish. You will to release this package with npx clean-publish instead of npm publish

Also #6 can be merged to fix now useless package.json key,

@7rulnik

7rulnik commented Oct 29, 2021

Copy link
Copy Markdown
Owner

@ai sorry for slow response

I think we should keep webpack, because currently, it is necessary for benchmarking in a browsers.
Also, we can remove API documentation and replace it with link to original source-map documentation.

And I like the idea of removing comments from published code. If you think it's safe enough, so let's do it.

@7rulnik

7rulnik commented Oct 29, 2021

Copy link
Copy Markdown
Owner

And as I understand, it should be major release? I'm fine with it. We can release it as 1.0.0 BTW. I thought that it will be useful to try keep in sync versions with original source-map, but seems that it doesn't make any sense.

@ai

ai commented Oct 29, 2021

Copy link
Copy Markdown
Author

I think we should keep webpack, because currently, it is necessary for benchmarking in a browsers.

Can we build webpack version just to use in benchmark and do not put file to npm package?

@ai

ai commented Oct 29, 2021

Copy link
Copy Markdown
Author

And as I understand, it should be major release

Yeap, let’s do major (1.0 or 0.7).

@7rulnik
7rulnik merged commit 5524ce0 into 7rulnik:patch-0.6.1 Nov 4, 2021
@ai

ai commented Nov 5, 2021

Copy link
Copy Markdown
Author

😍

20211105193924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants