Skip to content

Commit 62116c6

Browse files
committed
chore(soba): kinda workarounds for storybook
1 parent 72f9c1d commit 62116c6

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

libs/soba/.storybook/main.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,20 @@ const config: StorybookConfig = {
1010
],
1111

1212
staticDirs: ['./public', './public/cube'],
13-
framework: '@storybook/angular'
13+
framework: '@storybook/angular',
14+
15+
webpackFinal: async (config) => {
16+
// Handle Node.js polyfills for webpack 5
17+
config.resolve = {
18+
...config.resolve,
19+
fallback: {
20+
...config.resolve?.fallback,
21+
fs: false,
22+
path: require.resolve('path-browserify')
23+
}
24+
};
25+
return config;
26+
}
1427
};
1528

1629
export default config;

libs/soba/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"compodoc": false,
3737
"configDir": "libs/soba/.storybook",
3838
"browserTarget": "soba:build:development",
39-
"experimentalZoneless": true
39+
"experimentalZoneless": false
4040
}
4141
},
4242
"build-storybook": {
@@ -47,7 +47,7 @@
4747
"configDir": "libs/soba/.storybook",
4848
"outputDir": "dist/storybook/soba",
4949
"browserTarget": "soba:build:production",
50-
"experimentalZoneless": true
50+
"experimentalZoneless": false
5151
},
5252
"configurations": {
5353
"ci": {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"ng-packagr": "20.0.0",
7272
"node-three-gltf": "^2.0.2",
7373
"nx": "21.2.0",
74+
"path-browserify": "^1.0.1",
7475
"postcss": "^8.5.3",
7576
"postcss-import": "~16.1.0",
7677
"postcss-preset-env": "~9.6.0",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)