@quicktvui/web-cli 1.0.0-beta.29 → 1.0.0-beta.30
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 +9 -0
- package/lib/webpack.config.js +3 -1
- package/package.json +1 -1
package/lib/entry-package.js
CHANGED
|
@@ -63,3 +63,12 @@ import(__QUICKTVUI_MAIN_ENTRY__)
|
|
|
63
63
|
.catch((err) => {
|
|
64
64
|
console.error('[Web Renderer] Failed to load main module:', err)
|
|
65
65
|
})
|
|
66
|
+
|
|
67
|
+
// HMR 支持
|
|
68
|
+
if (module.hot) {
|
|
69
|
+
module.hot.accept()
|
|
70
|
+
module.hot.accept(__QUICKTVUI_MAIN_ENTRY__, () => {
|
|
71
|
+
console.log('[Web Renderer] Main module updated, reloading...')
|
|
72
|
+
window.location.reload()
|
|
73
|
+
})
|
|
74
|
+
}
|
package/lib/webpack.config.js
CHANGED
|
@@ -110,11 +110,12 @@ const entryFiles = ['regenerator-runtime/runtime', entryPackageFile]
|
|
|
110
110
|
|
|
111
111
|
module.exports = {
|
|
112
112
|
mode: 'development',
|
|
113
|
-
bail:
|
|
113
|
+
bail: false,
|
|
114
114
|
|
|
115
115
|
devServer: {
|
|
116
116
|
port,
|
|
117
117
|
hot: true,
|
|
118
|
+
liveReload: true,
|
|
118
119
|
proxy: [
|
|
119
120
|
{
|
|
120
121
|
context: ['/proxy'],
|
|
@@ -168,6 +169,7 @@ module.exports = {
|
|
|
168
169
|
},
|
|
169
170
|
|
|
170
171
|
plugins: [
|
|
172
|
+
new (require('webpack').HotModuleReplacementPlugin)(),
|
|
171
173
|
new (require('vue-loader').VueLoaderPlugin)(),
|
|
172
174
|
new (require('html-webpack-plugin'))({
|
|
173
175
|
inject: true,
|