@mandujs/core 0.18.9 → 0.18.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/bundler/build.ts +11 -1
package/package.json
CHANGED
package/src/bundler/build.ts
CHANGED
|
@@ -778,7 +778,8 @@ if (typeof window !== 'undefined') {
|
|
|
778
778
|
minify: false, // dev only
|
|
779
779
|
sourcemap: options.sourcemap ? "external" : "none",
|
|
780
780
|
target: "browser",
|
|
781
|
-
|
|
781
|
+
// React를 인라인 번들링 (import map 없이도 독립 동작)
|
|
782
|
+
// DevTools는 Shadow DOM 격리 → 앱 React와 충돌 없음
|
|
782
783
|
define: {
|
|
783
784
|
"process.env.NODE_ENV": JSON.stringify("development"),
|
|
784
785
|
...options.define,
|
|
@@ -1251,6 +1252,15 @@ export async function buildClientBundles(
|
|
|
1251
1252
|
// Hydration 라우트가 없어도 빈 매니페스트를 저장해야 함
|
|
1252
1253
|
// (이전 빌드의 stale 매니페스트 참조 방지)
|
|
1253
1254
|
if (hydratedRoutes.length === 0) {
|
|
1255
|
+
// Dev 모드에서는 DevTools 번들 빌드 (island 없어도 동작해야 함)
|
|
1256
|
+
const isDev = env === "development";
|
|
1257
|
+
if (isDev) {
|
|
1258
|
+
const devtoolsResult = await buildDevtoolsBundle(outDir, options);
|
|
1259
|
+
if (!devtoolsResult.success) {
|
|
1260
|
+
console.warn("[Mandu] DevTools bundle build failed:", devtoolsResult.errors.join(", "));
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1254
1264
|
const emptyManifest = createEmptyManifest(env);
|
|
1255
1265
|
await fs.writeFile(
|
|
1256
1266
|
path.join(rootDir, ".mandu/manifest.json"),
|