-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
v3.0.0 - Drop node-sass
and require sass
#1214
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mlaursen/react-md/3yuHqcaipqCjzV4nZsMnxC2M5QxL |
Codecov Report
@@ Coverage Diff @@
## main #1214 +/- ##
==========================================
+ Coverage 81.52% 81.93% +0.40%
==========================================
Files 339 337 -2
Lines 10079 9963 -116
Branches 2743 2711 -32
==========================================
- Hits 8217 8163 -54
+ Misses 1855 1793 -62
Partials 7 7
Continue to review full report at Codecov.
|
node-sass
and require sass
cd64513
to
8bae4be
Compare
326df72
to
497a069
Compare
BREAKING CHANGE: `$rmd-theme-dark-elevation` now defaults to `true` instead of `false`
BREAKING CHANGE: `node-sass` is no longer supported and users must switch to `sass`
…ing.scss` I really only created this file because after switching from `node-sass` to `sass`, my `sassdoc` generator ended up taking 45s+ to compile each example instead of 5-10s. After debugging a bit, I found out the bottleneck is the file resolution IO so I decided to just combine the files myself into a single `react-md/dist/_everything.scss` file which cut down the **total** `sassdoc` generation time to ~55s. It will be interesting to see if this single file import will improve build performance for real world apps, but it'll also require users to be fully migrated to `v3`.
With latest `sass-loader` and `sass`, code can be updated to: ```diff -@import 'react-md/dist/mixins'; +@use 'react-md' as *; @include react-md-utils; ``` Note: If you override variables, do: ```diff -@import 'react-md/dist/mixins'; +@use 'react-md' as * with ( + // all $rmd-* variable overrides +); @include react-md-utils; ```
This should no longer be an issue when using `@use "react-md";`
497a069
to
095ae97
Compare
Description
Since
node-sass
has been deprecated in favor ofsass
, this PR updates all the code to work withsass
instead.Features
Potential Build Performance Improvements
I ran into performance issues trying to compile the
dist/scssVariables.js
file in each package as well as the SassDoc examples and found out it was related to the@import
resolution. To work around this, I've created a new_everything.scss
file which will be available in the non-scopedreact-md
package asreact-md/dist/_everything.scss
. Replacing all of the@import
statements in the codebase to just be@import 'react-md/dist/everything';
might improve build performance on larger apps.Partial Support for the new Sass module system
You can switch from
@import
to@use
if you update all your code to use thereact-md/dist/_everything.scss
file:If you have variable overrides:
Breaking Changes
node-sass
support. usesass
insteadTooltipped
componentuseIndeterminatedChecked
implementation with multiple arguments instead of optionsTooltipHoverModeConfig
componentInteractionModeListener
alias$rmd-theme-dark-elevation
now defaults totrue