Skip to content

Commit 8ce2ea1

Browse files
authored
fix(plugin-react): transform .mjs files (#5314)
1 parent 3ac08cc commit 8ce2ea1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/plugin-react/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
9696
)
9797
},
9898
async transform(code, id, ssr) {
99-
if (/\.[tj]sx?$/.test(id)) {
99+
if (/\.(mjs|[tj]sx?)$/.test(id)) {
100100
const plugins = [...userPlugins]
101101

102102
const parserPlugins: typeof userParserPlugins = [

0 commit comments

Comments
 (0)