Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions docs/addons/addon-migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default defineConfig(async (options) => {
+ const packageJson = (
+ await import("./package.json", { with: { type: "json" } })
+ ).default;
+
+
const {
bundler: {
- exportEntries = [],
Expand All @@ -131,7 +131,7 @@ export default defineConfig(async (options) => {
};

const configs: Options[] = [];
-
-
- // export entries are entries meant to be manually imported by the user
- // they are not meant to be loaded by the manager or preview
- // they'll be usable in both node and browser environments, depending on which features and modules they depend on
Expand Down Expand Up @@ -225,13 +225,18 @@ Update `tsconfig.json`.
```diff title="tsconfig.json"
{
"compilerOptions": {
// ...
- "target": "es2023",
// …
+ "moduleResolution": "bundler",
// …
- "module": "commonjs",
+ "module": "preserve",
// …
- "target": "ES2020",
+ "target": "esnext",
// ...
- "lib": ["es2023", "dom", "dom.iterable"],
//
- "lib": ["es2020", "dom", "dom.iterable"],
+ "lib": ["esnext", "dom", "dom.iterable"],
// ...
//
- "rootDir": "./src",
+ "rootDir": ".",
},
Expand Down Expand Up @@ -292,7 +297,7 @@ With CSF Factories, users can chain their preview configuration and benefit from
- export default {};
+ import { definePreviewAddon } from "storybook/internal/csf";
+ import addonAnnotations from "./preview";
+
+
+ export default () => definePreviewAddon(addonAnnotations);
```

Expand Down Expand Up @@ -356,7 +361,7 @@ For a full list of changes, please visit the [Migration.md](https://github.com/s

## Migration example

For a complete example of an addon updated to support Storybook 10.0, refer to the [Addon Kit migration PR](https://github.com/storybookjs/addon-kit/pull/82).
For a complete example of an addon updated to support Storybook 10.0, refer to the [Addon Kit migration PR](https://github.com/storybookjs/addon-kit/pull/82).
Once merged, it will demonstrate all the necessary and recommended changes for Storybook 10.

## Releasing
Expand Down
Loading