Skip to content

Silence Sass legacy JS API deprecation warning#178

Merged
mlaponder merged 2 commits into
mendix:masterfrom
r0b1n:fix-sass-deprecation-warning
May 29, 2026
Merged

Silence Sass legacy JS API deprecation warning#178
mlaponder merged 2 commits into
mendix:masterfrom
r0b1n:fix-sass-deprecation-warning

Conversation

@r0b1n
Copy link
Copy Markdown
Contributor

@r0b1n r0b1n commented May 28, 2026

Summary

  • Suppress the "The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0" warning by configuring rollup-plugin-postcss to silence the legacy-js-api deprecation

Changes

Updated rollup.config.mjs to pass silenceDeprecations: ['legacy-js-api'] to the sass preprocessor in two places:

  1. In the preview entry postcss plugin configuration (line 161)
  2. In the postCssPlugin function (line 361)

This change ports the fix from mendix/web-widgets#2234 to the widgets-tools repository.

Test plan

  • Build passes without sass deprecation warnings
  • Widget builds work correctly with the updated configuration

Suppress the "The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0" warning by configuring rollup-plugin-postcss to use the new silenceDeprecations option for sass.

This change updates the rollup config to pass silenceDeprecations: ['legacy-js-api'] to the sass preprocessor, preventing the deprecation warnings during build.
@weirdwater
Copy link
Copy Markdown
Collaborator

Created WTF-2668 on our backlog to update the bundler config for this upcoming deprecation.

@weirdwater
Copy link
Copy Markdown
Collaborator

Can you add a "Changed" line to the pluggable-widgets-tools changelog?

@mlaponder mlaponder merged commit 579050c into mendix:master May 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants