Skip to content

Commit 2bfddc4

Browse files
authored
fix: Set esbuild target to es6 to be backwards compatible. (#157)
`rollup-plugin-esbuild` [v6](https://github.com/egoist/rollup-plugin-esbuild/releases/tag/v6.0.0) defaults to es2020 by default and no longer respects tsconfig.json's target. This PR explicitly sets esbuild to target ES2015 aka ES6 so the build is backwards compatible. Fixes this [issue](#283 (comment)).
1 parent e50f397 commit 2bfddc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rollup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import json from '@rollup/plugin-json';
55
import resolve from '@rollup/plugin-node-resolve';
66
import terser from '@rollup/plugin-terser';
77

8-
const plugins = [resolve(), esbuild(), json(), terser(), filesize()];
8+
const plugins = [resolve(), esbuild({ target: 'es6' }), json(), terser(), filesize()];
99
const external = /node_modules/;
1010

1111
export default [

0 commit comments

Comments
 (0)