@servicetitan/docs-uikit 34.0.1 → 34.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,7 +25,7 @@ In the MFE's `package.json`, set,
|
|
|
25
25
|
- `private` to `true`
|
|
26
26
|
- `cli.web-component` to `true`,
|
|
27
27
|
- `cli.webpack.port` to a free port from where to serve the MFE locally
|
|
28
|
-
- `publishConfig.access` to `"
|
|
28
|
+
- `publishConfig.access` to `"restricted"`
|
|
29
29
|
|
|
30
30
|
E.g.,
|
|
31
31
|
|
package/docs/startup/startup.mdx
CHANGED
|
@@ -66,3 +66,54 @@ Use `cli.NODE_OPTIONS` or `cli.*.NODE_OPTIONS` to set or override Node options f
|
|
|
66
66
|
:::tip
|
|
67
67
|
`Startup` automatically uses `--max_old_space_size` to increase available memory for memory intensive commands like `build`, `start`, `lint` and `test`.
|
|
68
68
|
:::
|
|
69
|
+
|
|
70
|
+
## Storybook Configuration
|
|
71
|
+
|
|
72
|
+
✨ New in **v34.1.0** ✨
|
|
73
|
+
|
|
74
|
+
`@servicetitan/startup` provides utility functions to configure Storybook 10 or later with the same webpack and SWC settings used by the [build](./build) and [start](./start) commands.
|
|
75
|
+
|
|
76
|
+
To use, import `webpackFinal` and `swc` from `@servicetitan/startup/storybook-config` in your Storybook `main.ts` configuration:
|
|
77
|
+
|
|
78
|
+
```ts title=".storybook/main.ts"
|
|
79
|
+
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
80
|
+
import { createRequire } from 'node:module';
|
|
81
|
+
|
|
82
|
+
const require = createRequire(import.meta.url);
|
|
83
|
+
const { swc, webpackFinal } = require('@servicetitan/startup/storybook-config');
|
|
84
|
+
|
|
85
|
+
const config: StorybookConfig = {
|
|
86
|
+
framework: '@storybook/react-webpack5',
|
|
87
|
+
stories: ['../**/*.stories.ts?(x)'],
|
|
88
|
+
webpackFinal,
|
|
89
|
+
swc,
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export default config;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Custom overrides
|
|
96
|
+
|
|
97
|
+
You can also pass custom webpack overrides to `webpackFinal`:
|
|
98
|
+
|
|
99
|
+
```ts title=".storybook/main.ts"
|
|
100
|
+
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
101
|
+
import { createRequire } from 'node:module';
|
|
102
|
+
|
|
103
|
+
const require = createRequire(import.meta.url);
|
|
104
|
+
const { swc, webpackFinal } = require('@servicetitan/startup/storybook-config');
|
|
105
|
+
|
|
106
|
+
const config: StorybookConfig = {
|
|
107
|
+
framework: '@storybook/react-webpack5',
|
|
108
|
+
stories: ['../src/**/*.stories.ts?(x)'],
|
|
109
|
+
webpackFinal: config =>
|
|
110
|
+
webpackFinal(config, {
|
|
111
|
+
/* Custom webpack overrides */
|
|
112
|
+
}),
|
|
113
|
+
swc,
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export default config;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
For details about the structure and options available in webpack overrides, see the [createWebpackConfig](./build#createwebpackconfig) section in the build documentation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/docs-uikit",
|
|
3
|
-
"version": "34.0
|
|
3
|
+
"version": "34.1.0",
|
|
4
4
|
"description": "Documentation content for Uikit packages published at docs.st.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"cli": {
|
|
17
17
|
"webpack": false
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "660a104c81cce6867a7bb3081ab3f2f0140e403a"
|
|
20
20
|
}
|