Skip to content

Fix bug where css files in node_modules were pre-bundled#142

Merged
calebeby merged 2 commits intomainfrom
fix-css-bug-in-node_modules
Jul 7, 2021
Merged

Fix bug where css files in node_modules were pre-bundled#142
calebeby merged 2 commits intomainfrom
fix-css-bug-in-node_modules

Conversation

@calebeby
Copy link
Copy Markdown
Member

@calebeby calebeby commented Jul 7, 2021

When CSS files were imported, from node_modules (like import '@reach/dialog/styles.css'), the CSS file would get pre-bundled into a JS file, which was causing issues because when it got imported the 2nd time it would try to parse the JS file as a CSS file and convert it to JS a second time. This makes it so that for any non-JS files that are imported from node_modules, the pre-bundle step is skipped.

Copy link
Copy Markdown
Member

@gerardo-rodriguez gerardo-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! 👍

@calebeby calebeby merged commit 2da5f1c into main Jul 7, 2021
@calebeby calebeby deleted the fix-css-bug-in-node_modules branch July 7, 2021 21:59
@github-actions github-actions Bot mentioned this pull request Jul 7, 2021
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.

2 participants