Skip to content

Conversation

@barak007
Copy link

@barak007 barak007 commented May 27, 2020

This PR moves regexpu-core to be a dev dependency to save 380k when creating a web bundle by transpiling the usages in build time.

Also might have a minor speed up at initialization time.

Fixes #22

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2020

Codecov Report

Merging #23 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         6    +1     
  Lines          187       188    +1     
=========================================
+ Hits           187       188    +1     
Impacted Files Coverage Δ
lib/parse.js 100.00% <100.00%> (ø)
lib/stringify.js 100.00% <100.00%> (ø)
lib/uni-regexp.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a6cb09...c9b8237. Read the comment docs.

@AviVahl
Copy link

AviVahl commented Jun 1, 2020

heya @evilebottnawi, any chance you could check this optimization out?

It makes css-selector-tokenizer much smaller when bundled for browser usage, and with less transitive runtime dependencies.

@tomrav
Copy link

tomrav commented Jun 24, 2020

@geelen we'd really appreciate it if someone can review and merge or comment on this PR.

@barak007
Copy link
Author

@sokra @evilebottnawi I would appreciate if someone could take a look on this PR. We are currently using a work around to avoid the huge size increase.

@alexander-akait
Copy link
Member

@barak007 Where we use this module? Wi migrate on postcss and postcss-selector-parser

@AviVahl
Copy link

AviVahl commented Jul 20, 2020

@evilebottnawi we are using it in several places in https://github.com/wix/stylable

This PR solves a size regression that affects anyone who bundles css-selector-tokenizer and runs it inside the browser. It probably also improves the evaluation time of the package.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, can we merge and do release? It is just a patch, nothing changes, yes?

@AviVahl
Copy link

AviVahl commented Jul 20, 2020

Yes, it can be a patch release. 👍

@alexander-akait alexander-akait merged commit d770cbf into css-modules:master Jul 21, 2020
@alexander-akait
Copy link
Member

Done, 0.7.3 is released

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.

Bundle size increases by more then 10x

5 participants