diff --git a/app/angular/src/client/preview/index.ts b/app/angular/src/client/preview/index.ts index 91ff1e5e2ea9..d361910b9ea2 100644 --- a/app/angular/src/client/preview/index.ts +++ b/app/angular/src/client/preview/index.ts @@ -1,6 +1,6 @@ /* eslint-disable prefer-destructuring */ -import { ClientStoryApi, Loadable } from '@storybook/addons'; -import { start } from '@storybook/core/client'; +import type { ClientStoryApi, Loadable } from '@storybook/addons'; +import { start } from '@storybook/core'; import './globals'; import { renderToDOM, render } from './render'; import decorateStory from './decorateStory'; diff --git a/app/ember/src/client/preview/index.ts b/app/ember/src/client/preview/index.ts index b2642044a9f8..b85ad89f9751 100644 --- a/app/ember/src/client/preview/index.ts +++ b/app/ember/src/client/preview/index.ts @@ -1,4 +1,4 @@ -import { start } from '@storybook/core/client'; +import { start } from '@storybook/core'; import './globals'; import { renderToDOM } from './render'; diff --git a/app/html/src/client/preview/index.ts b/app/html/src/client/preview/index.ts index 96f8be1e9156..7c28d84012ba 100644 --- a/app/html/src/client/preview/index.ts +++ b/app/html/src/client/preview/index.ts @@ -1,6 +1,6 @@ /* eslint-disable prefer-destructuring */ -import { start } from '@storybook/core/client'; -import { ClientStoryApi, Loadable } from '@storybook/addons'; +import { start } from '@storybook/core'; +import type { ClientStoryApi, Loadable } from '@storybook/addons'; import { HtmlFramework } from './types-6-0'; import './globals'; diff --git a/app/preact/src/client/preview/index.ts b/app/preact/src/client/preview/index.ts index 82bbf67a73d3..b5214e5397bc 100644 --- a/app/preact/src/client/preview/index.ts +++ b/app/preact/src/client/preview/index.ts @@ -1,6 +1,6 @@ /* eslint-disable prefer-destructuring */ -import { start } from '@storybook/core/client'; -import { ClientStoryApi, Loadable } from '@storybook/addons'; +import { start } from '@storybook/core'; +import type { ClientStoryApi, Loadable } from '@storybook/addons'; import './globals'; import { renderToDOM } from './render'; diff --git a/app/react/src/client/preview/index.tsx b/app/react/src/client/preview/index.tsx index 4f47993c6719..9847e6da2046 100644 --- a/app/react/src/client/preview/index.tsx +++ b/app/react/src/client/preview/index.tsx @@ -1,5 +1,5 @@ /* eslint-disable prefer-destructuring */ -import { start } from '@storybook/core/client'; +import { start } from '@storybook/core'; import { ClientStoryApi, Loadable } from '@storybook/addons'; import './globals'; diff --git a/app/server/src/client/preview/index.ts b/app/server/src/client/preview/index.ts index 3f8917f05570..516064afeebf 100644 --- a/app/server/src/client/preview/index.ts +++ b/app/server/src/client/preview/index.ts @@ -1,5 +1,5 @@ -import { start } from '@storybook/core/client'; -import { ClientStoryApi, Loadable } from '@storybook/addons'; +import { start } from '@storybook/core'; +import type { ClientStoryApi, Loadable } from '@storybook/addons'; import './globals'; import { renderToDOM, render } from './render'; diff --git a/app/svelte/src/client/preview/index.ts b/app/svelte/src/client/preview/index.ts index 98a669e180b0..a7f3f4c9b0f1 100644 --- a/app/svelte/src/client/preview/index.ts +++ b/app/svelte/src/client/preview/index.ts @@ -1,4 +1,4 @@ -import { start } from '@storybook/core/client'; +import { start } from '@storybook/core'; import { decorateStory } from './decorators'; import './globals'; diff --git a/app/vue/src/client/preview/index.ts b/app/vue/src/client/preview/index.ts index 14f10b1c1be1..1e6207ff3846 100644 --- a/app/vue/src/client/preview/index.ts +++ b/app/vue/src/client/preview/index.ts @@ -1,6 +1,6 @@ /* eslint-disable prefer-destructuring */ -import { start } from '@storybook/core/client'; -import { ClientStoryApi, Loadable } from '@storybook/addons'; +import { start } from '@storybook/core'; +import type { ClientStoryApi, Loadable } from '@storybook/addons'; import './globals'; import { IStorybookSection } from './types'; diff --git a/app/vue3/src/client/preview/index.ts b/app/vue3/src/client/preview/index.ts index 6c3642f19377..5f3214c4296c 100644 --- a/app/vue3/src/client/preview/index.ts +++ b/app/vue3/src/client/preview/index.ts @@ -1,6 +1,6 @@ import type { App } from 'vue'; -import { start } from '@storybook/core/client'; -import { ClientStoryApi, Loadable } from '@storybook/addons'; +import { start } from '@storybook/core'; +import type { ClientStoryApi, Loadable } from '@storybook/addons'; import './globals'; import { IStorybookSection } from './types'; diff --git a/app/web-components/src/client/preview/index.ts b/app/web-components/src/client/preview/index.ts index 44ba037d0f03..5a4f07c7879d 100644 --- a/app/web-components/src/client/preview/index.ts +++ b/app/web-components/src/client/preview/index.ts @@ -1,6 +1,6 @@ /* eslint-disable prefer-destructuring */ -import { start } from '@storybook/core/client'; -import { ClientStoryApi, Loadable } from '@storybook/addons'; +import { start } from '@storybook/core'; +import type { ClientStoryApi, Loadable } from '@storybook/addons'; import './globals'; import { renderToDOM } from './render'; diff --git a/docs/snippets/common/storybook-client-preview.ts.mdx b/docs/snippets/common/storybook-client-preview.ts.mdx index 436d862dc8ac..765d8d1ab341 100644 --- a/docs/snippets/common/storybook-client-preview.ts.mdx +++ b/docs/snippets/common/storybook-client-preview.ts.mdx @@ -1,7 +1,7 @@ ```ts // your-framework/src/client/preview/index.ts -import { start } from '@storybook/core/client'; +import { start } from '@storybook/core'; import './globals'; diff --git a/lib/core/client.js b/lib/core/client.js index 0cea520ec68b..35c555488761 100644 --- a/lib/core/client.js +++ b/lib/core/client.js @@ -1 +1,3 @@ -module.exports = require('./dist/cjs/index'); +// @storybook/core was split into core-client and core-server. This file is for backwards-compat. +// TODO: remove in 7.0 +module.exports = require('./dist/esm/index');