@quicktvui/web-cli 1.0.0-beta.35 → 1.0.0-beta.36

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.
@@ -1,6 +1,6 @@
1
1
  // @quicktvui/web-cli - web entry
2
2
  // 通过 @quicktvui/web-renderer 导入所有依赖
3
- // 主入口由 webpack 静态加载,HMR 可追踪
3
+ // 主入口由 webpack 在本文件之前加载,App 已注册
4
4
 
5
5
  console.log('[Web Renderer] === Starting initialization ===')
6
6
 
@@ -49,12 +49,15 @@ styleEl.textContent = `
49
49
  document.head.appendChild(styleEl)
50
50
  console.log('[Web Renderer] Global CSS reset injected')
51
51
 
52
- // 启动引擎(主入口由 webpack 静态加载,会在本文件之后执行)
52
+ // 启动引擎(主入口已在前加载并注册 App)
53
53
  console.log('[Web Renderer] Starting engine...')
54
54
  startWebEngine(engine, APP_NAME)
55
55
  console.log('[Web Renderer] === Initialization complete ===')
56
56
 
57
- // HMR 支持 - 接受所有模块更新
57
+ // HMR 支持
58
+
58
59
  if (module.hot) {
60
+
59
61
  module.hot.accept()
62
+
60
63
  }
@@ -156,14 +156,15 @@ module.exports = {
156
156
 
157
157
  devtool: 'source-map',
158
158
 
159
- // 多入口配置:主入口静态加载以便 HMR 追踪
159
+ // 入口配置:主入口在 entry-package 之前加载以确保 App 先注册
160
+ // webpack 会按顺序执行入口文件
160
161
  entry: {
161
162
  index: [
162
163
  `${webpackDevServerPath}?http://localhost:${port}`,
163
164
  'webpack/hot/dev-server',
164
165
  'regenerator-runtime/runtime',
165
- entryPackageFile,
166
- mainEntry, // 静态加载主入口,HMR 可以追踪
166
+ mainEntry, // 先加载主入口,注册 App
167
+ entryPackageFile, // 再加载初始化代码,启动引擎
167
168
  ],
168
169
  },
169
170
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quicktvui/web-cli",
3
- "version": "1.0.0-beta.35",
3
+ "version": "1.0.0-beta.36",
4
4
  "description": "CLI tool for QuickTVUI web development - zero configuration",
5
5
  "author": "QuickTVUI Team",
6
6
  "license": "Apache-2.0",