Skip to content

Commit 5027145

Browse files
authored
fix(storybook): add raw query and .md rules in module.rules (web-infra-dev#4986)
1 parent 7f1b2bb commit 5027145

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.changeset/wicked-walls-search.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@modern-js/storybook-builder': patch
3+
---
4+
5+
fix(storybook): add raw query and .md rules in module.rules
6+
fix(storybook): module.rules 中增加 raw query 和 .md 规则

packages/storybook/builder/src/plugin-storybook.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ async function applyMdxLoader(
310310
config.module ??= {};
311311
config.module.rules ??= [];
312312
config.module.rules.push(
313+
{
314+
resourceQuery: /raw/,
315+
type: 'asset/source',
316+
},
317+
{
318+
test: /\.md$/,
319+
type: 'asset/source',
320+
},
313321
{
314322
test: /(stories|story)\.mdx$/,
315323
use: [

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy