Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Followup changing CJS entrypoints to ESM #17927

Merged
merged 2 commits into from Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion addons/links/react.js
@@ -1 +1,3 @@
module.exports = require('./dist/esm/react');
import LinkTo from './dist/esm/react';

export default LinkTo;
3 changes: 2 additions & 1 deletion lib/components/html.js
@@ -1 +1,2 @@
module.exports = require('./dist/esm/html');
// eslint-disable-next-line import/no-unresolved
export * from './dist/esm/html';
Comment on lines +1 to +2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ndelangen these three "entrypoints" (@storybook-components/html, @storybook-router/utils and @storybook-theming/create) don't actually work now we pre-bundle. I included the change just to call it out in the PR, but right now these files don't point to anything (thus the linting issue)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, that seems like a pretty big deal.. I do not remember why we had those separate entrypoints to begin with, do you remember why we introduced those?\

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I know nothing about them. @shilman?

Copy link
Member

@shilman shilman Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmeasday @ndelangen

@storybook/components/html was a grouping for MDX docs elements. we deprecated it a year ago, so if we have an unintentional breaking change there it's not the end of the world:

https://github.com/storybookjs/storybook/blob/next/lib/components/src/html.tsx

I'm less sure about the other two. @ndelangen I think that's more your territory.

3 changes: 1 addition & 2 deletions lib/core/client.js
@@ -1,3 +1,2 @@
// @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');
export * from './dist/esm/index';
3 changes: 2 additions & 1 deletion lib/router/utils.js
@@ -1 +1,2 @@
module.exports = require('./dist/esm/utils');
// eslint-disable-next-line import/no-unresolved
export * from './dist/esm/utils';
3 changes: 2 additions & 1 deletion lib/theming/create.js
@@ -1 +1,2 @@
module.exports = require('./dist/esm/create');
// eslint-disable-next-line import/no-unresolved
export * from './dist/esm/create';