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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/docs/jest-transform-mdx.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ module.exports = {
import { mdx } from '@mdx-js/react'
${mdx.sync(src, { compilers, filepath: filename })}
`;

const extension = path.extname(filename);
const jsFileName = `${filename.slice(0, -extension.length)}.js`;

return new ScriptTransformer(config).transformSource(jsFileName, result, instrument);
},
};
6 changes: 1 addition & 5 deletions lib/core/src/client/preview/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,7 @@ export default function start(render, { decorateStory } = {}) {
reqs.forEach(req => {
req.keys().forEach(filename => {
const fileExports = req(filename);
currentExports.set(
fileExports,
typeof req.resolve === 'function' ? req.resolve(filename) : null
);
currentExports.set(fileExports, filename);
});
});
} else {
Expand Down Expand Up @@ -404,7 +401,6 @@ export default function start(render, { decorateStory } = {}) {
} = meta;
// We pass true here to avoid the warning about HMR. It's cool clientApi, we got this
const kind = clientApi.storiesOf(kindName, true);

// we should always have a framework, rest optional
kind.addParameters({
framework,
Expand Down