Skip to content

Commit 3f0043e

Browse files
committed
fixup!
1 parent ab53572 commit 3f0043e

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/generators/web/utils/bundle.mjs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,21 @@ export default async function bundleCode(code, { server = false } = {}) {
4141
? ['preact', 'preact-render-to-string', '@node-core/ui-components']
4242
: [],
4343

44-
// Inject global compile-time constants that will be replaced in code.
45-
// These are useful for tree-shaking and conditional branching.
46-
// Be sure to update type declarations (`types.d.ts`) if these change.
47-
define: {
48-
// Static data injected directly into the bundle (as a literal or serialized JSON).
49-
__STATIC_DATA__: staticData,
50-
51-
// Boolean flags used for conditional logic in source code:
52-
// Example: `if (SERVER) {...}` or `if (CLIENT) {...}`
53-
// These flags help split logic for server/client environments.
54-
// Unused branches will be removed via tree-shaking.
55-
SERVER: String(server),
56-
CLIENT: String(!server),
44+
transform: {
45+
// Inject global compile-time constants that will be replaced in code.
46+
// These are useful for tree-shaking and conditional branching.
47+
// Be sure to update type declarations (`types.d.ts`) if these change.
48+
define: {
49+
// Static data injected directly into the bundle (as a literal or serialized JSON).
50+
__STATIC_DATA__: staticData,
51+
52+
// Boolean flags used for conditional logic in source code:
53+
// Example: `if (SERVER) {...}` or `if (CLIENT) {...}`
54+
// These flags help split logic for server/client environments.
55+
// Unused branches will be removed via tree-shaking.
56+
SERVER: String(server),
57+
CLIENT: String(!server),
58+
},
5759
},
5860

5961
// JSX transformation configuration.

0 commit comments

Comments
 (0)