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

fix: define window to avoid breakage when using it in the config file #142

Merged
merged 2 commits into from
Jul 29, 2020

Conversation

sarahdayan
Copy link
Member

When a user uses window in the config file outside of a function, it will break the export process because the postcss.config.js file imports the config file to get the data under styles. Because window doesn't exist in Node, it throws.

This PR fixes the issue by defining window and setting it to global. We don't care that window doesn't exist in that case because we don't want to get data from it in this context. Styles need to be defined statically for now, because we need them to write the stylesheet.

@sarahdayan sarahdayan merged commit ac30515 into next Jul 29, 2020
@sarahdayan sarahdayan deleted the fix/window-global branch July 29, 2020 09:22
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.

None yet

2 participants