UNPKG

777 BJavaScriptView Raw
1module.exports = {
2 presets: [
3 [
4 '@babel/preset-env',
5 {
6 modules: process.env.BABEL_MODULES ? false : 'umd',
7 loose: true,
8 shippedProposals: true,
9 // we need the spread to not be loose:
10 exclude: [
11 '@babel/plugin-transform-spread',
12 '@babel/plugin-transform-destructuring',
13 ],
14 ...(process.env.NODE_ENV === 'test'
15 ? {
16 targets: {
17 node: 'current',
18 },
19 }
20 : {}),
21 },
22 ],
23 '@babel/preset-typescript',
24 ],
25 plugins: [
26 '@babel/plugin-syntax-bigint',
27 '@babel/plugin-transform-spread',
28 '@babel/plugin-transform-destructuring',
29 ],
30 exclude: ['./dist', './cjs', './esm'],
31 moduleId: 'Hashids',
32}