Skip to content

Commit

Permalink
perf: Speed up Storybook start time
Browse files Browse the repository at this point in the history
- Use lazy loading of stories
- Disable Compodoc, it wasn't used
- Only specify entrypoint in tsconfig
  • Loading branch information
MoritzWeber0 committed Dec 3, 2024
1 parent 5f230dd commit 3de8702
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
10 changes: 7 additions & 3 deletions frontend/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ const config: StorybookConfig = {
name: '@storybook/angular',
options: {},
},
docs: {
autodocs: 'tag',
},
core: {
disableTelemetry: true,
enableCrashReports: false,
builder: {
name: '@storybook/builder-webpack5',
options: {
lazyCompilation: true,
fsCache: true,
},
},
},
};
export default config;
2 changes: 1 addition & 1 deletion frontend/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"resolveJsonModule": true
},
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
"include": ["./preview.ts", "../src/polyfills.ts", "../src/**/*.stories.ts"],
"include": ["./preview.ts", "../src/polyfills.ts"],
"files": ["./typings.d.ts"]
}
6 changes: 2 additions & 4 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@
"configDir": ".storybook",
"quiet": true,
"browserTarget": "capellacollab:build:development",
"compodoc": true,
"compodocArgs": ["-e", "json", "-d", "."],
"compodoc": false,
"port": 6006,
"styles": [
".storybook/styles.css",
Expand All @@ -148,8 +147,7 @@
"options": {
"configDir": ".storybook",
"browserTarget": "capellacollab:build:storybook",
"compodoc": true,
"compodocArgs": ["-e", "json", "-d", "."],
"compodoc": false,
"outputDir": "storybook-static",
"styles": [
".storybook/styles.css",
Expand Down
1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@angular/build": "^19.0.2",
"@angular/cli": "~19.0.2",
"@angular/compiler-cli": "~19.0.1",
"@compodoc/compodoc": "^1.1.26",
"@eslint/js": "^9.16.0",
"@storybook/addon-docs": "^8.4.6",
"@storybook/addon-essentials": "^8.4.6",
Expand Down

0 comments on commit 3de8702

Please sign in to comment.