Skip to content

Commit

Permalink
feat(documentation): render sourcemap for css files on dev (#2063)
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver Schürch <[email protected]>
  • Loading branch information
imagoiq and oliverschuerch authored Oct 12, 2023
1 parent 78da210 commit ed101b1
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 39 deletions.
8 changes: 8 additions & 0 deletions packages/documentation/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { StorybookConfig } from '@storybook/web-components-vite';
import pkg from '../package.json';
import { mergeConfig } from 'vite';

const config: StorybookConfig = {
logLevel: 'info',
Expand Down Expand Up @@ -49,6 +50,13 @@ const config: StorybookConfig = {
STORYBOOK_GTM_PAGE_CONTEXT_ENVIRONMENT_PROD: 'design-system.post.ch,next.design-system.post.ch',
STORYBOOK_GTM_PAGE_CONTEXT_ENVIRONMENT_FALLBACK: 'dev',
}),
async viteFinal(config, options) {
return mergeConfig(config, {
css: {
devSourcemap: true,
},
});
},
};

export default config;
3 changes: 2 additions & 1 deletion packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"@swisspost/design-system-icons": "workspace:1.0.12",
"@swisspost/design-system-styles": "workspace:6.4.1",
"@swisspost/internet-header": "workspace:1.10.0",
"bootstrap": "5.3.2"
"bootstrap": "5.3.2",
"vite": "4.4.11"
},
"devDependencies": {
"@geometricpanda/storybook-addon-badges": "2.0.0",
Expand Down
Loading

0 comments on commit ed101b1

Please sign in to comment.