Skip to content

Commit

Permalink
[5.2] Build process: Change Dart-Sass to new API (#44659)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar authored Jan 19, 2025
1 parent 0bb707c commit 40a39c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/build-modules-js/javascript/compile-to-es2017.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { nodeResolve } = require('@rollup/plugin-node-resolve');
const replace = require('@rollup/plugin-replace');
const { babel } = require('@rollup/plugin-babel');
const LightningCSS = require('lightningcss');
const { renderSync } = require('sass-embedded');
const { compile } = require('sass-embedded');
const { minifyJsCode } = require('./minify.es6.js');
const { getPackagesUnderScope } = require('../init/common/resolve-package.es6.js');

Expand All @@ -33,7 +33,7 @@ const getWcMinifiedCss = async (file) => {
if (scssFileExists) {
let compiled;
try {
compiled = renderSync({ file: scssFile });
compiled = compile(scssFile);
} catch (error) {
// eslint-disable-next-line no-console
console.error(`${error.column}
Expand Down
2 changes: 1 addition & 1 deletion build/build-modules-js/stylesheets/handle-scss.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports.handleScssFile = async (file) => {

let compiled;
try {
compiled = Sass.renderSync({ file });
compiled = Sass.compile(file);
} catch (error) {
// eslint-disable-next-line no-console
console.error(error.formatted);
Expand Down
2 changes: 1 addition & 1 deletion build/build-modules-js/stylesheets/scss-transform.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports.compile = async (file) => {

let compiled;
try {
compiled = Sass.renderSync({ file });
compiled = Sass.compile(file);
} catch (error) {
// eslint-disable-next-line no-console
console.error(error.formatted);
Expand Down

0 comments on commit 40a39c4

Please sign in to comment.