Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e96dc01

Browse files
committed
use esbuild-plugin-babel in esbuild-config
1 parent 0c935b1 commit e96dc01

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

esbuild-config.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { glsl } from 'esbuild-plugin-glsl';
22
import { environmentPlugin } from 'esbuild-plugin-environment';
3+
import babel from 'esbuild-plugin-babel';
34

45
export default {
56
entryPoints: ['./lib/index.js'],
@@ -11,10 +12,15 @@ export default {
1112
sourcemap: true,
1213
plugins: [
1314
glsl({
14-
minify: true
15+
minify: true,
1516
}),
1617
environmentPlugin({
17-
NODE_DEBUG: false
18+
NODE_DEBUG: false,
19+
}),
20+
babel({
21+
config: {
22+
presets: ['@babel/preset-env'],
23+
}
1824
}),
1925
],
2026
alias: {
@@ -23,6 +29,6 @@ export default {
2329
define: {
2430
global: 'window',
2531
},
26-
target: 'es2016',
32+
target: 'es5',
2733
logLevel: 'info',
2834
};

0 commit comments

Comments
 (0)