Skip to content

Conversation

@adamwathan
Copy link
Member

Resolves #2354.

This isn't a long-term solution but will make things less annoying for people for now. Basically the problem is if we aren't careful, we introduce dependencies into resolveConfig that aren't compatible with the browser. We should probably tackle this as a dedicated project some point and come up with an overall better solution to the whole problem of trying to access your config in JS. Personally I don't think people actually want this code in their client bundles, they just want the resolved config. Something like preval is probably the way to go here, but I don't know how we bake that into Tailwind itself.

@adamwathan adamwathan merged commit 6a9c3e7 into master Sep 11, 2020
@adamwathan adamwathan deleted the move-dark-variant-to-core branch September 11, 2020 14:15
@AlexanderOpran
Copy link

Hey @adamwathan, thank you for the really quick fix! Keep up the good work, highly appreciate your dedication to tailwind 😁

Now, a quick question from my side, wouldn't it be better to have the resolvedConfiguration already made without any calls at runtime? That could all the same be a generated file resolvedConfig.js or something like that with no runtime implications.

@adamwathan
Copy link
Member Author

Yeah I totally agree but we’d need to figure an API for that, can’t just magically exist you know? Can definitely add a CLI command that spits it out. We use babel-preval ourselves when we need this.

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.

Breaking change after updating to 1.8.x (from 1.7.5)

3 participants