From 2dd29150b6d8428e5079ab703cae46bd220a362e Mon Sep 17 00:00:00 2001 From: Philipp Gfeller <1659006+gfellerph@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:17:37 +0200 Subject: [PATCH] chore: fix pnpm start command (#3504) This change excludes `@swisspost/design-system-styles` from the vite optmizeDeps workflow for the documentation package. This seems to get rid of some of the "can't import dynamic dependency" issues. Reloading after a style change is still pretty slow, but also a lot of unnecessry recompiles are happening. The potential for improvement is quite big here. --- packages/documentation/vite.config.js | 1 + packages/styles/gulpfile.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/documentation/vite.config.js b/packages/documentation/vite.config.js index 5ca5ef6e10..af7680cc71 100644 --- a/packages/documentation/vite.config.js +++ b/packages/documentation/vite.config.js @@ -21,5 +21,6 @@ export default { '@storybook/theming', '@storybook/addon-links', ], + exclude: ['@swisspost/design-system-styles'], }, }; diff --git a/packages/styles/gulpfile.js b/packages/styles/gulpfile.js index df7e5df4fa..b296f68221 100644 --- a/packages/styles/gulpfile.js +++ b/packages/styles/gulpfile.js @@ -151,7 +151,7 @@ gulp.task('build-components', () => { */ gulp.task('sass:dev', () => { return gulp - .src('./src/*.scss', { since: gulp.lastRun('sass:dev') }) + .src('./src/*.scss') .pipe( gulpSass({ includePaths: options.includePaths, @@ -180,7 +180,7 @@ gulp.task('sass:tests', () => { gulp.task( 'watch', gulp.series('temporarily-copy-token-files', () => { - return gulp.watch('./src/**/*.scss', gulp.series('copy')); + return gulp.watch('./src/**/*.scss', gulp.series('copy', 'sass:dev')); }), );