Skip to content

Commit 3ec9cda

Browse files
authored
fix: skip fallback sourcemap generation for ?raw imports (#22148)
1 parent b168d0d commit 3ec9cda

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/vite/src/node/plugins/asset.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
209209
code: `export default ${JSON.stringify(
210210
await fsp.readFile(file, 'utf-8'),
211211
)}`,
212+
map: { mappings: '' },
212213
moduleType: 'js', // NOTE: needs to be set to avoid double `export default` in `?raw&.txt`s
213214
}
214215
}

0 commit comments

Comments
 (0)