mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-08 00:24:21 +02:00
29 lines
754 B
JavaScript
29 lines
754 B
JavaScript
module.exports = (api) => {
|
|
const isWeb = api.caller((caller) => caller && caller.target === "isWeb")
|
|
|
|
return {
|
|
presets: [
|
|
[
|
|
"@babel/env",
|
|
{
|
|
useBuiltIns: isWeb ? "usage" : undefined,
|
|
corejs: isWeb ? 3 : false,
|
|
},
|
|
],
|
|
"@babel/typescript",
|
|
[
|
|
"@babel/react",
|
|
{
|
|
runtime: "automatic",
|
|
},
|
|
],
|
|
],
|
|
plugins: ["@loadable/babel-plugin", "@babel/plugin-transform-runtime"],
|
|
env: {
|
|
development: {
|
|
plugins: isWeb ? ["react-refresh/babel"] : undefined,
|
|
},
|
|
},
|
|
}
|
|
}
|