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

Fix: Search stories #10539

Merged
merged 3 commits into from
May 19, 2020
Merged

Conversation

Vlad160
Copy link

@Vlad160 Vlad160 commented Apr 24, 2020

Issue: #10519

Search throws errors on the current release in prod mode. The issue is that for dev mode webpack uses filenames as values of modules found using require.context. But in prod mode, it uses numbers to minimize the size.

Submitting these changes to master because this bug is not reproducible of next. On the next branch, there is a check that parameters.fileName is a string.
However, these changes should be cherry-picked to next

What I did

Use filename for require.key() instead of require.resolve()

How to test

  1. Bootstrap
  2. Build examples/official-storybook
  3. cd ../storybook-static
  4. npx http-server .
  5. Search in Strorybook

@stale
Copy link

stale bot commented May 15, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label May 15, 2020
@stale stale bot removed the inactive label May 15, 2020
@ndelangen ndelangen self-assigned this May 19, 2020
@ndelangen ndelangen merged commit 03117ee into storybookjs:master May 19, 2020
@Vlad160
Copy link
Author

Vlad160 commented May 19, 2020

Thanks @ndelangen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants