Skip to content
Closed
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
7 changes: 7 additions & 0 deletions code/addons/docs/template/stories/stories-mdx/RawSource.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React, { Fragment } from 'react';

export const MY_VALUE_I_WANT_TO_SHOW_IN_STORY = 'Hello World!';

export const RawSource = () => {
return <Fragment>{MY_VALUE_I_WANT_TO_SHOW_IN_STORY}</Fragment>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { RawSource as RawSourceComponent } from './RawSource.jsx';
// eslint-disable-next-line import/no-unresolved
import RawSourceCode from './RawSource.jsx?raw';

export default {
component: RawSourceComponent,
};

export const RawSource = {
parameters: {
docs: {
source: {
code: RawSourceCode,
language: 'tsx',
type: 'code',
},
},
},
};
1 change: 1 addition & 0 deletions code/builders/builder-webpack5/src/preview/loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const createBabelLoader = async (
options: babelOptions,
},
],
resourceQuery: { not: [/raw/] },
include: [getProjectRoot()],
exclude: [/node_modules/, ...excludes],
};
Expand Down