Skip to content

Commit

Permalink
fix(plugin-react): transform .mjs files (#5314)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson authored Oct 15, 2021
1 parent 3ac08cc commit 8ce2ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
)
},
async transform(code, id, ssr) {
if (/\.[tj]sx?$/.test(id)) {
if (/\.(mjs|[tj]sx?)$/.test(id)) {
const plugins = [...userPlugins]

const parserPlugins: typeof userParserPlugins = [
Expand Down

0 comments on commit 8ce2ea1

Please sign in to comment.