Use rolldownOptions.transform.define
This commit is contained in:
@@ -38,6 +38,13 @@ export default defineConfig({
|
|||||||
react: "window.React",
|
react: "window.React",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
transform: {
|
||||||
|
define: {
|
||||||
|
// Use production mode for the build as it is tested against production builds of Element Web,
|
||||||
|
// this is required for React JSX versions to be compatible.
|
||||||
|
"process.env.NODE_ENV": JSON.stringify("production"),
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
@@ -48,9 +55,4 @@ export default defineConfig({
|
|||||||
include: ["events"],
|
include: ["events"],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
define: {
|
|
||||||
// Use production mode for the build as it is tested against production builds of Element Web,
|
|
||||||
// this is required for React JSX versions to be compatible.
|
|
||||||
process: { env: { NODE_ENV: "production" } },
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ export default defineConfig({
|
|||||||
react: "window.React",
|
react: "window.React",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
transform: {
|
||||||
|
define: {
|
||||||
|
// Use production mode for the build as it is tested against production builds of Element Web,
|
||||||
|
// this is required for React JSX versions to be compatible.
|
||||||
|
"process.env.NODE_ENV": JSON.stringify("production"),
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
minify: false,
|
minify: false,
|
||||||
},
|
},
|
||||||
@@ -45,9 +52,4 @@ export default defineConfig({
|
|||||||
include: ["events"],
|
include: ["events"],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
define: {
|
|
||||||
// Use production mode for the build as it is tested against production builds of Element Web,
|
|
||||||
// this is required for React JSX versions to be compatible.
|
|
||||||
process: { env: { NODE_ENV: "production" } },
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,6 +37,13 @@ export default defineConfig({
|
|||||||
react: "window.React",
|
react: "window.React",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
transform: {
|
||||||
|
define: {
|
||||||
|
// Use production mode for the build as it is tested against production builds of Element Web,
|
||||||
|
// this is required for React JSX versions to be compatible.
|
||||||
|
"process.env.NODE_ENV": JSON.stringify("production"),
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
@@ -46,9 +53,4 @@ export default defineConfig({
|
|||||||
include: ["events"],
|
include: ["events"],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
define: {
|
|
||||||
// Use production mode for the build as it is tested against production builds of Element Web,
|
|
||||||
// this is required for React JSX versions to be compatible.
|
|
||||||
process: { env: { NODE_ENV: "production" } },
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ export default defineConfig({
|
|||||||
react: "window.React",
|
react: "window.React",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
transform: {
|
||||||
|
define: {
|
||||||
|
// Use production mode for the build as it is tested against production builds of Element Web,
|
||||||
|
// this is required for React JSX versions to be compatible.
|
||||||
|
"process.env.NODE_ENV": JSON.stringify("production"),
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
@@ -48,9 +55,4 @@ export default defineConfig({
|
|||||||
include: ["events"],
|
include: ["events"],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
define: {
|
|
||||||
// Use production mode for the build as it is tested against production builds of Element Web,
|
|
||||||
// this is required for React JSX versions to be compatible.
|
|
||||||
process: { env: { NODE_ENV: "production" } },
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user