Skip to content

Commit bc4f9bc

Browse files
committed
wip
1 parent 4a11e13 commit bc4f9bc

File tree

2 files changed

+17
-26
lines changed

2 files changed

+17
-26
lines changed

packages/signals/signals-runtime/babel.config.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/signals/signals-runtime/build-signals-runtime-global.js

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,29 @@ const buildRuntime = async (platform) => {
6868
const entryPoint = getEntryPoint(platform)
6969
const { outfileUnminified, outfileMinified } = getOutFiles(platform)
7070

71+
const babelPlugin = babel({
72+
config: {
73+
presets: [
74+
[
75+
'@babel/preset-env',
76+
{
77+
targets: {
78+
ie: '11', // target es5 -- for example, react-native's QuickJS does not support class
79+
},
80+
},
81+
],
82+
'@babel/preset-typescript',
83+
],
84+
},
85+
})
7186
// Bundle and minify with esbuild
7287
await esbuild.build({
7388
entryPoints: [entryPoint],
7489
outfile: outfileMinified,
7590
bundle: true,
7691
minify: true,
7792
banner: { js: getBanner(entryPoint) },
78-
plugins: [
79-
babel({
80-
config: {
81-
presets: ['@babel/preset-env', '@babel/preset-typescript'],
82-
},
83-
}),
84-
],
93+
plugins: [babelPlugin],
8594
})
8695
console.log(`wrote: ${outfileMinified}`)
8796

@@ -92,13 +101,7 @@ const buildRuntime = async (platform) => {
92101
bundle: true,
93102
minify: false,
94103
banner: { js: getBanner(entryPoint) },
95-
plugins: [
96-
babel({
97-
config: {
98-
presets: ['@babel/preset-env', '@babel/preset-typescript'],
99-
},
100-
}),
101-
],
104+
plugins: [babelPlugin],
102105
})
103106
console.log(`wrote: ${outfileUnminified}`)
104107
}

0 commit comments

Comments
 (0)