We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeacdf9 commit 4cda5beCopy full SHA for 4cda5be
packages/vite/src/node/plugins/esbuild.ts
@@ -101,14 +101,14 @@ export async function transformWithEsbuild(
101
102
export function esbuildPlugin(options: ESBuildOptions = {}): Plugin {
103
const filter = createFilter(
104
- options.include || /\.(tsx?|jsx)($|\?)/,
105
- options.exclude
+ options.include || /\.(tsx?|jsx)$/,
+ options.exclude || /\.js$/
106
)
107
108
return {
109
name: 'vite:esbuild',
110
async transform(code, id) {
111
- if (filter(id)) {
+ if (filter(id) || filter(cleanUrl(id))) {
112
const result = await transformWithEsbuild(code, id, options)
113
if (result.warnings.length) {
114
result.warnings.forEach((m) => {
0 commit comments