Skip to content

Commit

Permalink
fix: do not apply json plugin to commonjs proxy
Browse files Browse the repository at this point in the history
close #1679
  • Loading branch information
yyx990803 committed Jan 24, 2021
1 parent d884424 commit a92f430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface JsonOptions {
}

// Custom json filter for vite
const jsonExtRE = new RegExp(`\\.json($|\\?)`)
const jsonExtRE = /\.json($|\?)(?!commonjs-proxy)/

export function jsonPlugin(
options: JsonOptions = {},
Expand Down

0 comments on commit a92f430

Please sign in to comment.