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

Compile SCSS to CSS #295

Closed
lottamus opened this issue Mar 10, 2020 · 1 comment · Fixed by #510
Closed

Compile SCSS to CSS #295

lottamus opened this issue Mar 10, 2020 · 1 comment · Fixed by #510

Comments

@lottamus
Copy link
Contributor

User story.
As a developer, I can use @stoplight/elements without needing to compile the SCSS files myself.

Is your feature request related to a problem?
BigCommerce and PagerDuty are using these React components in their GatsbyJS sites. Prior to v5, we were compiling the SCSS files into a single CSS bundle that they are including in their build.

Describe the solution you'd like
Compile the SCSS files to CSS using node-sass or similar.

@marcelltoth
Copy link
Contributor

marcelltoth commented Mar 10, 2020

I believe the problem is more general. We should not force our clients to use TypeScript and similar either.

Proposal:

Let's create a bundle:

  • 2 single JS file, one ESM one CommonJS
  • ES2017+
  • 1 single CSS file
  • 1 .d.ts file
  • maybe a source map

And distribute this instead of the separate files right now.

As we specify sideEffects: false webpack will still be able to tree-shake it, so I don't see any disadvantages.

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 a pull request may close this issue.

2 participants