mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
Initial commit
This commit is contained in:
28
babel.config.js
Normal file
28
babel.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
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,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user