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

Using with browserify+babelify doesn't add styles #46

Open
knownasilya opened this issue Jun 29, 2016 · 2 comments
Open

Using with browserify+babelify doesn't add styles #46

knownasilya opened this issue Jun 29, 2016 · 2 comments

Comments

@knownasilya
Copy link

I also tried csjs-extractify but it creates a blank CSS file. Is there a way to get it to work?

@rtsao
Copy link
Owner

rtsao commented Jun 29, 2016

csjs-extractify needs to run before babelify. I suspect this is what is happening:

csjs`.foo {}`

is being turned into:

"use strict";

var _templateObject = _taggedTemplateLiteral([".foo {}"], [".foo {}"]);

function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

csjs(_templateObject);

Which csjs-extractify won't recognize.

@knownasilya
Copy link
Author

Thanks! Will give it a try!

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

No branches or pull requests

2 participants