Skip to content

Typescript support, performance optimization and browser friendly version (no source-map) #164

@holblin

Description

@holblin

Hi,

I use css for multiple of our projects and I have an issue with the source-map support.
Indeed, due to Webpack 5 and some projects that can't eject from create-react-app, these teams couldn't use CSS (fs can't be polyfilled because Webpack config is not available if you don't eject.).

To solve the issue, I started to fork the project locally and remove the source-map support.
While doing that work I also rewrote some parts of it, moving the project to Typescript and increasing the performance by about 30% in some cases.

Before:
css parse - small x 1,675 ops/sec ±1.00% (89 runs sampled)
css parse - large x 20.37 ops/sec ±1.31% (38 runs sampled)
css parse - huge x 3.17 ops/sec ±2.24% (12 runs sampled)
After:
css parse - small x 2,115 ops/sec ±0.96% (94 runs sampled)
css parse - large x 22.91 ops/sec ±2.02% (42 runs sampled)
css parse - huge x 3.57 ops/sec ±4.45% (13 runs sampled)

How could I contact you (member of rework) to discuss about importing the changes?
@dead-horse @fengmk2 @joakimbeng @jxson @kevva @SlexAxton @tj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions