@rsbuild/plugin-mdx 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -64,6 +64,12 @@ const pluginMdx = (options = {})=>({
64
64
  const { REACT_FAST_REFRESH } = CHAIN_ID.PLUGIN;
65
65
  if (chain.plugins.has(REACT_FAST_REFRESH)) chain.plugins.get(REACT_FAST_REFRESH).tap((options)=>{
66
66
  const firstOption = options[0] ?? {};
67
+ if (firstOption.test) firstOption.test = [
68
+ ...Array.isArray(firstOption.test) ? firstOption.test : [
69
+ firstOption.test
70
+ ],
71
+ MDX_REGEXP
72
+ ];
67
73
  firstOption.include = [
68
74
  ...firstOption.include || [],
69
75
  MDX_REGEXP
package/dist/index.js CHANGED
@@ -32,6 +32,12 @@ const pluginMdx = (options = {})=>({
32
32
  const { REACT_FAST_REFRESH } = CHAIN_ID.PLUGIN;
33
33
  if (chain.plugins.has(REACT_FAST_REFRESH)) chain.plugins.get(REACT_FAST_REFRESH).tap((options)=>{
34
34
  const firstOption = options[0] ?? {};
35
+ if (firstOption.test) firstOption.test = [
36
+ ...Array.isArray(firstOption.test) ? firstOption.test : [
37
+ firstOption.test
38
+ ],
39
+ MDX_REGEXP
40
+ ];
35
41
  firstOption.include = [
36
42
  ...firstOption.include || [],
37
43
  MDX_REGEXP
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-mdx",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "repository": "https://github.com/rspack-contrib/rsbuild-plugin-mdx",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  "@playwright/test": "^1.54.1",
41
41
  "@rsbuild/core": "^1.4.12",
42
42
  "@rsbuild/plugin-preact": "^1.5.1",
43
- "@rsbuild/plugin-react": "^1.3.4",
43
+ "@rsbuild/plugin-react": "^1.4.0",
44
44
  "@rsbuild/plugin-svgr": "^1.2.1",
45
45
  "@rsbuild/plugin-vue": "^1.1.0",
46
46
  "@rslib/core": "^0.11.0",