Docs: Raw support for mjs, jsx, and tsx files#25018
Closed
ndelangen wants to merge 4 commits into
Closed
Conversation
JReinhold
reviewed
Nov 28, 2023
Comment on lines
+1
to
+9
| import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'; | ||
| import * as stories from './raw-source.non-stories'; | ||
| import { RawSource } from './RawSource'; | ||
|
|
||
| <Meta component={RawSource} /> | ||
|
|
||
| <Canvas> | ||
| <Story story={stories.RawSource} /> | ||
| </Canvas> No newline at end of file |
Contributor
There was a problem hiding this comment.
This test case doesn't make sense anymore, since MDX Stories won't be supported in 8.0 anyway.
JReinhold
requested changes
Nov 28, 2023
Contributor
JReinhold
left a comment
There was a problem hiding this comment.
I think the resourceQuery itself is fine, but I expect we can test this in a regular story, we don't need to test this through MDX.
Member
Author
|
@JReinhold do you have a suggestion on how to make this story only function for a specific set of sandboxes? none-svelte and non-angular? Alternatively, any suggestions why they seem to not work for those frameworks? |
Contributor
|
@ndelangen For Angular, it is pretty easy to answer. Angular might use its own babel-loader on top. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-apply: #21671 by @42shadow42
What I did
Enabled support for loading truly raw mjs,jsx, and tsx files by disabling the babel-loader when the raw query is set.
How to test
yarn task --task sandbox --template react-webpack/18-tsInstead of:
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:mergedorci:dailyGH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>