Skip to content

Commit

Permalink
fix: force esbuild to output ES2019 (#155)
Browse files Browse the repository at this point in the history
Rollup does not appear to support optional chaining (`foo?.bar`). Work
around this by lowering the esbuild target to ES2019

Related: rollup/plugins#205
  • Loading branch information
Dykam authored May 17, 2020
1 parent bdc7e70 commit 00f4a83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node/esbuildService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export const transform = async (
...options,
loader: options.loader || (path.extname(file).slice(1) as any),
sourcemap: true,
sourcefile: file
sourcefile: file,
target: 'es2019'
}
try {
const result = await service.transform(src, options)
Expand Down

0 comments on commit 00f4a83

Please sign in to comment.