You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.
I'm trying to use your starter kit to build a React lib, one thing that is missing is to be able to build the lib with SASS and have the build process generate browser-ready CSS files.
The text was updated successfully, but these errors were encountered:
Hi @ido-ran, thank you for creating an issue. I may be wrong and please correct if I am, but I feel having SASS support is a very specific use case, and not every React library will have a style component to it. If SASS support were to be part of the starterkit, the next thing would be to support LESS, then other preprocessors, CSS Modules or specific inline style toolkits. This is a can of worms in my eyes and it would be quite hard for me to maintain all these eventualities.
The easiest thing for you in your use case would to add another command to be built in npm run build, in this case generating SASS files. You could try having something like "npm run build": "rollup-babel-lib-bundler src/index.js && node-sass src/mystyles.scss dist/mystyles.css" and add node-sass as a devDependency.
If your SASS files are required inside your JavaScript you would need to pass a plugin into rollup-babel-lib-bundler, and while I haven't tried this myself yet, https://github.com/differui/rollup-plugin-sass may be what you are looking for.
Hi,
I agree that this is a can of worms simple because of the shere number of tools/plugins/formats.
It will be valuable, if you have the time, to show how to both produce and consume css as it is vital part of almost any web library.
The problem I found is that there is no clear way nor best practice for producing web-library that expose css as well as js.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to use your starter kit to build a React lib, one thing that is missing is to be able to build the lib with SASS and have the build process generate browser-ready CSS files.
The text was updated successfully, but these errors were encountered: