@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.
- package/lib/entry-package.js +6 -3
- package/lib/webpack.config.js +4 -3
- package/package.json +1 -1
package/lib/entry-package.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @quicktvui/web-cli - web entry
|
|
2
2
|
// 通过 @quicktvui/web-renderer 导入所有依赖
|
|
3
|
-
// 主入口由 webpack
|
|
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
|
-
//
|
|
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
|
}
|
package/lib/webpack.config.js
CHANGED
|
@@ -156,14 +156,15 @@ module.exports = {
|
|
|
156
156
|
|
|
157
157
|
devtool: 'source-map',
|
|
158
158
|
|
|
159
|
-
//
|
|
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
|
-
|
|
166
|
-
|
|
166
|
+
mainEntry, // 先加载主入口,注册 App
|
|
167
|
+
entryPackageFile, // 再加载初始化代码,启动引擎
|
|
167
168
|
],
|
|
168
169
|
},
|
|
169
170
|
|