Skip to content

Commit

Permalink
chore(styles): quick win styles build improvement (#4114)
Browse files Browse the repository at this point in the history
Using `sass-embedded` should improve performance of our sass builds a
bit and it's very easy to implement. Stayed with version 1.78.0 due to
additional deprecation warnings when updating to 1.81.0.
  • Loading branch information
gfellerph authored Dec 2, 2024
1 parent e0d8562 commit 4233420
Show file tree
Hide file tree
Showing 5 changed files with 536 additions and 48 deletions.
2 changes: 1 addition & 1 deletion packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"rehype-autolink-headings": "7.1.0",
"rehype-slug": "6.0.0",
"rimraf": "6.0.1",
"sass": "1.78.0",
"sass-embedded": "1.78.0",
"storybook": "8.2.7",
"typescript": "5.5.4"
}
Expand Down
8 changes: 8 additions & 0 deletions packages/documentation/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ export default {
],
exclude: ['@swisspost/design-system-styles'],
},
// https://www.oddbird.net/2024/08/14/sass-compiler/
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
};
2 changes: 1 addition & 1 deletion packages/styles/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require('fs');
const path = require('path');
const gulp = require('gulp');
const sass = require('sass');
const sass = require('sass-embedded');
const newer = require('gulp-newer');
const gulpSass = require('gulp-sass')(sass);
const sourcemaps = require('gulp-sourcemaps');
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"postcss-scss": "4.0.9",
"prettier": "3.3.3",
"rimraf": "6.0.1",
"sass": "1.78.0",
"sass-embedded": "1.78.0",
"stylelint": "16.9.0",
"stylelint-config-sass-guidelines": "11.1.0",
"stylelint-prettier": "5.0.2",
Expand Down
Loading

0 comments on commit 4233420

Please sign in to comment.