mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
add jotai/babel/plugin-debug-label on dev server
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const { whenProd } = require("@craco/craco");
|
||||
const CracoAlias = require("craco-alias");
|
||||
const CracoSwcPlugin = require("craco-swc");
|
||||
|
||||
@@ -11,20 +12,30 @@ module.exports = {
|
||||
tsConfigPath: "./tsconfig.extend.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
plugin: CracoSwcPlugin,
|
||||
options: {
|
||||
swcLoaderOptions: {
|
||||
jsc: {
|
||||
target: "es2019",
|
||||
transform: {
|
||||
react: {
|
||||
runtime: "automatic",
|
||||
// Use swc on production only since Jotai doesn’t have swc plugins yet
|
||||
// See https://github.com/pmndrs/jotai/discussions/1057
|
||||
...whenProd(
|
||||
() => [
|
||||
{
|
||||
plugin: CracoSwcPlugin,
|
||||
options: {
|
||||
swcLoaderOptions: {
|
||||
jsc: {
|
||||
target: "es2021",
|
||||
transform: {
|
||||
react: {
|
||||
runtime: "automatic",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
[]
|
||||
),
|
||||
],
|
||||
babel: {
|
||||
plugins: ["jotai/babel/plugin-debug-label"],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user