From 0b644643e55a003a530898c46c961bba434ff322 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 28 Nov 2023 17:02:20 +0100 Subject: [PATCH] Revert "Docs: Raw support for `mjs`, `jsx`, and `tsx` files" --- .../template/stories/stories-mdx/RawSource.jsx | 7 ------- .../stories/stories-mdx/raw-source.non-stories.js | 15 --------------- .../stories/stories-mdx/raw-source.stories.mdx | 9 --------- .../builder-webpack5/src/preview/loaders.ts | 1 - 4 files changed, 32 deletions(-) delete mode 100644 code/addons/docs/template/stories/stories-mdx/RawSource.jsx delete mode 100644 code/addons/docs/template/stories/stories-mdx/raw-source.non-stories.js delete mode 100644 code/addons/docs/template/stories/stories-mdx/raw-source.stories.mdx diff --git a/code/addons/docs/template/stories/stories-mdx/RawSource.jsx b/code/addons/docs/template/stories/stories-mdx/RawSource.jsx deleted file mode 100644 index 9bcc6c261cda..000000000000 --- a/code/addons/docs/template/stories/stories-mdx/RawSource.jsx +++ /dev/null @@ -1,7 +0,0 @@ -import React, { Fragment } from 'react'; - -export const MY_VALUE_I_WANT_TO_SHOW_IN_STORY = 'Hello World!'; - -export const RawSource = () => { - return {MY_VALUE_I_WANT_TO_SHOW_IN_STORY}; -}; \ No newline at end of file diff --git a/code/addons/docs/template/stories/stories-mdx/raw-source.non-stories.js b/code/addons/docs/template/stories/stories-mdx/raw-source.non-stories.js deleted file mode 100644 index 358f4c64d7bd..000000000000 --- a/code/addons/docs/template/stories/stories-mdx/raw-source.non-stories.js +++ /dev/null @@ -1,15 +0,0 @@ -import { RawSource as RawSourceComponent } from './RawSource.jsx'; -// eslint-disable-next-line import/no-unresolved -import RawSourceCode from './RawSource.jsx?raw'; - -export const RawSource = RawSourceComponent.bind({}); - -RawSource.parameters = { - docs: { - source: { - code: RawSourceCode, - language: 'tsx', - type: 'code', - }, - }, -}; \ No newline at end of file diff --git a/code/addons/docs/template/stories/stories-mdx/raw-source.stories.mdx b/code/addons/docs/template/stories/stories-mdx/raw-source.stories.mdx deleted file mode 100644 index 472febb7d053..000000000000 --- a/code/addons/docs/template/stories/stories-mdx/raw-source.stories.mdx +++ /dev/null @@ -1,9 +0,0 @@ -import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'; -import * as stories from './raw-source.non-stories'; -import { RawSource } from './RawSource'; - - - - - - \ No newline at end of file diff --git a/code/builders/builder-webpack5/src/preview/loaders.ts b/code/builders/builder-webpack5/src/preview/loaders.ts index 98e7dbd8efd9..868d35ba394c 100644 --- a/code/builders/builder-webpack5/src/preview/loaders.ts +++ b/code/builders/builder-webpack5/src/preview/loaders.ts @@ -20,7 +20,6 @@ export const createBabelLoader = async ( options: babelOptions, }, ], - resourceQuery: { not: [/raw/] }, include: [getProjectRoot()], exclude: [/node_modules/, ...excludes], };