diff --git a/code/deprecated/manager/globals.cjs b/code/deprecated/manager/globals.cjs new file mode 100644 index 000000000000..d6ee8ec2d144 --- /dev/null +++ b/code/deprecated/manager/globals.cjs @@ -0,0 +1 @@ +module.exports = require('storybook/internal/manager/globals'); diff --git a/code/deprecated/manager/globals.d.ts b/code/deprecated/manager/globals.d.ts new file mode 100644 index 000000000000..a2b581c8ca04 --- /dev/null +++ b/code/deprecated/manager/globals.d.ts @@ -0,0 +1,2 @@ +export * from 'storybook/internal/manager/globals'; +export type * from 'storybook/internal/manager/globals'; diff --git a/code/deprecated/manager/globals.js b/code/deprecated/manager/globals.js index d6ee8ec2d144..0dab1b6906f8 100644 --- a/code/deprecated/manager/globals.js +++ b/code/deprecated/manager/globals.js @@ -1 +1 @@ -module.exports = require('storybook/internal/manager/globals'); +export * from 'storybook/internal/manager/globals'; diff --git a/code/deprecated/manager/package.json b/code/deprecated/manager/package.json index de415ee731cf..779cd2f09ba3 100644 --- a/code/deprecated/manager/package.json +++ b/code/deprecated/manager/package.json @@ -20,6 +20,14 @@ }, "license": "MIT", "sideEffects": false, + "type": "module", + "exports": { + "./globals": { + "type": "./globals.d.ts", + "import": "./globals.js", + "require": "./globals.cjs" + } + }, "files": [ "README.md", "*.js", diff --git a/code/deprecated/preview/globals.cjs b/code/deprecated/preview/globals.cjs new file mode 100644 index 000000000000..91340ce6505b --- /dev/null +++ b/code/deprecated/preview/globals.cjs @@ -0,0 +1 @@ +module.exports = require('storybook/internal/preview/globals'); diff --git a/code/deprecated/preview/globals.d.ts b/code/deprecated/preview/globals.d.ts new file mode 100644 index 000000000000..165a3a44a8fb --- /dev/null +++ b/code/deprecated/preview/globals.d.ts @@ -0,0 +1,2 @@ +export * from 'storybook/internal/preview/globals'; +export type * from 'storybook/internal/preview/globals'; diff --git a/code/deprecated/preview/globals.js b/code/deprecated/preview/globals.js index 91340ce6505b..c04bc1063044 100644 --- a/code/deprecated/preview/globals.js +++ b/code/deprecated/preview/globals.js @@ -1 +1 @@ -module.exports = require('storybook/internal/preview/globals'); +export * from 'storybook/internal/preview/globals'; diff --git a/code/deprecated/preview/package.json b/code/deprecated/preview/package.json index 6f21598fc62b..c634a85c29b6 100644 --- a/code/deprecated/preview/package.json +++ b/code/deprecated/preview/package.json @@ -20,6 +20,14 @@ }, "license": "MIT", "sideEffects": false, + "type": "module", + "exports": { + "./globals": { + "type": "./globals.d.ts", + "import": "./globals.js", + "require": "./globals.cjs" + } + }, "files": [ "README.md", "*.js",