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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use css-to-object for parsing styles #159

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

danielberndt
Copy link

css-to-object uses a more elaborate parsing algorithm. For example it deals correctly with semicolons within a url() property.

fixes #158

@DanBuild
Copy link

DanBuild commented Oct 10, 2018

Deploy preview for react-magic ready!

Built with commit 85d4eaa

https://deploy-preview-159--react-magic.netlify.com

@Daniel15
Copy link
Member

Looks like the build failed... Could you please take a look?

@danielberndt
Copy link
Author

Okay I fixed the built. I needed to add an empty fs shim. i also had to apply babel to the bundle, since some of the dependencies used es6 which could not be uglified with the ugligy version used in this project.

I should probably also mention, that the size of the bundle has now significantly increased. Because a full css parser is now included. The .min.js files are now ~75KB instead of ~18KB.

@Daniel15
Copy link
Member

Daniel15 commented Nov 23, 2018

Could you please also try shim source-map-support and see if that reduces the bundle size? We don't really need source maps for this use case (ref https://github.com/reworkcss/css/blob/master/lib/stringify/index.js#L30-L32).

Please check where the bundle size increase is coming from and whether everything being added is 100% needed.

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.

complex style prop not parsed correctly
3 participants