forked from babel/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
42 lines (41 loc) · 875 Bytes
/
babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"use strict";
module.exports = function (api) {
api.cache(true);
return {
targets: {
// This is browserslist defaults
browsers: ["> 0.5%", "last 2 versions", "Firefox ESR", "not dead"],
},
presets: [
[
"@babel/preset-env",
{
useBuiltIns: "entry",
corejs: require("core-js/package.json").version,
shippedProposals: true,
},
],
[
"@babel/preset-react",
{
runtime: "automatic",
development: process.env.NODE_ENV === "development",
},
],
[
"@babel/preset-typescript",
{
onlyRemoveTypeImports: true,
},
],
],
env: {
production: {
plugins: ["@emotion"],
},
development: {
plugins: [["@emotion", { sourceMap: true }]],
},
},
};
};