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

Refactor Highlight CSS loading to avoid css-loader expectation #29

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

kylesuss
Copy link
Contributor

@kylesuss kylesuss commented Jun 25, 2019

An interesting thing happened when I was trying to import this design system into another app -- the CSS file in the Highlight component was throwing errors as if it could not be loaded properly. I've realized that there is not an issue w/ this in Storybook as they have their own CSS loader and so does Gatsby (which is why it didn't come up during the learnstorybook.com development).

Therefore, I have decided to just copy over the prism CSS theme rather than try to import the CSS file for a few reasons:

  1. The build process in this repo does not utilize webpack, so it would be more difficult to add that in addition to the css-loader
  2. There did not seem to be a babel equivalent to webpack's css-loader that I could use instead (we build the design system w/ babel and not webpack)
  3. It seems like we should not assume that the consumers of this design system should have to set up the css-loader

@kylesuss kylesuss requested a review from domyen June 25, 2019 19:13
@domyen domyen merged commit 1206be6 into master Jun 26, 2019
@domyen domyen deleted the fix-css-loader branch June 26, 2019 14:11
@kylesuss
Copy link
Contributor Author

🚀 PR was released in v0.0.27 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants