We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe46e56 commit 0c0b7edCopy full SHA for 0c0b7ed
src/index.ts
@@ -75,6 +75,20 @@ const react = (_options?: Options): PluginOption[] => {
75
include: [`${options.jsxImportSource}/jsx-dev-runtime`],
76
},
77
}),
78
+ configResolved(config) {
79
+ const mdxIndex = config.plugins.findIndex(
80
+ (p) => p.name === "@mdx-js/rollup",
81
+ );
82
+ if (
83
+ mdxIndex !== -1 &&
84
+ mdxIndex >
85
+ config.plugins.findIndex((p) => p.name === "vite:react-swc")
86
+ ) {
87
+ config.logger.warn(
88
+ "[vite:react-swc] The MDX plugin should be placed before this plugin",
89
90
+ }
91
+ },
92
transformIndexHtml: (_, config) => [
93
{
94
tag: "script",
0 commit comments