Skip to content

Commit

Permalink
add CJS for core/components
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jul 3, 2024
1 parent 4288e65 commit bd36625
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion code/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
},
"./components": {
"types": "./dist/components/index.d.ts",
"import": "./dist/components/index.js"
"import": "./dist/components/index.js",
"require": "./dist/components/index.cjs"
},
"./theming": {
"types": "./dist/theming/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion code/core/scripts/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const getEntries = (cwd: string) => {
define('src/preview-api/index.ts', ['browser', 'node'], true),
define('src/manager-api/index.ts', ['browser', 'node'], true, ['react']),
define('src/router/index.ts', ['browser', 'node'], true, ['react']),
define('src/components/index.ts', ['browser'], true, [
define('src/components/index.ts', ['browser', 'node'], true, [
'react',
'react-dom',
'@storybook/csf',
Expand Down
1 change: 1 addition & 0 deletions code/lib/cli/core/components/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@storybook/core/components');
3 changes: 2 additions & 1 deletion code/lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@
},
"./internal/components": {
"types": "./core/components/index.d.ts",
"import": "./core/components/index.js"
"import": "./core/components/index.js",
"require": "./core/components/index.cjs"
},
"./internal/theming": {
"types": "./core/theming/index.d.ts",
Expand Down

0 comments on commit bd36625

Please sign in to comment.