Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce npm package size #7

Merged
merged 6 commits into from
Nov 4, 2021
Merged

Reduce npm package size #7

merged 6 commits into from
Nov 4, 2021

Conversation

ai
Copy link

@ai ai commented Oct 6, 2021

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鈥檚 side. For instance, most of my open source doesn鈥檛 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
Copy link
Owner

7rulnik commented Oct 29, 2021

@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
Copy link
Owner

7rulnik commented Oct 29, 2021

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
Copy link
Author

ai commented Oct 29, 2021

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
Copy link
Author

ai commented Oct 29, 2021

And as I understand, it should be major release

Yeap, let鈥檚 do major (1.0 or 0.7).

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

ai commented Nov 5, 2021

馃槏

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.

None yet

2 participants