Skip to content

Commit ec895fc

Browse files
Fix react-toastify Sass @import deprecation warnings
Warning fixed: - "Sass @import rules are deprecated" emitted from "react-toastify/scss/main.scss" during yarn build. Approach: - Stop compiling Toastify Sass source and import the packages compiled CSS (react-toastify/dist/ReactToastify.css) instead. - Remove the upstream SCSS @use from InternalStyles.scss. Why this approach: - Preserves Toastify styling behavior while eliminating upstream Sass deprecation output in our build. - Avoids carrying or maintaining local forks of third-party styles. Alternatives considered: - Keep importing SCSS and suppress warnings globally: rejected because it hides actionable deprecations. - Patch Toastify Sass locally: rejected due to maintenance overhead and divergence from upstream. Co-authored-by: Chris Zetter <zetter-rpf@users.noreply.github.com>
1 parent 2689c94 commit ec895fc

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/assets/stylesheets/ExternalStyles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
@use "../../../node_modules/react-toggle/style.css";
44
@use "../../../node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css";
55
@use "../../../node_modules/prismjs/plugins/line-highlight/prism-line-highlight.css";
6+
@use "../../../node_modules/react-toastify/dist/ReactToastify.css";
67
@use "../../../node_modules/material-symbols/sharp.scss";
78
@use "../../../node_modules/plotly.js/src/css/style.scss" as plotlyStyle;

src/assets/stylesheets/InternalStyles.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@use "../../../node_modules/react-toastify/scss/main.scss" as *;
2-
31
@use "./rpf_design_system/colours" as *;
42
@use "./rpf_design_system/font-size" as *;
53
@use "./rpf_design_system/font-weight" as *;

0 commit comments

Comments
 (0)