UNPKG

698 BJavaScriptView Raw
1const pkgDir = require('pkg-dir'),
2 rootDir = pkgDir.sync(process.cwd())
3
4module.exports = {
5 compact: true,
6 presets: [
7 [
8 '@babel/preset-env',
9 {
10 useBuiltIns: 'entry',
11 corejs: 3,
12 },
13 ],
14 ],
15 plugins: [
16 ['@babel/plugin-transform-react-jsx'],
17 ['@babel/proposal-optional-chaining'],
18 ['@babel/proposal-class-properties'],
19 [
20 'babel-plugin-module-resolver',
21 {
22 root: rootDir,
23 alias: {
24 lib: [rootDir + '/lib', __dirname + '/lib'],
25 components: rootDir + '/lib/components',
26 hooks: rootDir + '/lib/hooks',
27 },
28 },
29 ],
30 ],
31 ignore: [/node_modules\/(?!(fec|lodash-es))/],
32}