@quicktvui/web-cli 1.0.0-beta.32 → 1.0.0-beta.33
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/webpack.config.js +8 -4
- package/package.json +1 -1
package/lib/webpack.config.js
CHANGED
|
@@ -106,7 +106,14 @@ const resolveLoader = (loaderName) => require.resolve(loaderName, { paths: [cliD
|
|
|
106
106
|
|
|
107
107
|
// 入口文件:只加载 entry-package.js,主入口通过动态 import 加载
|
|
108
108
|
const entryPackageFile = path.resolve(__dirname, 'entry-package.js')
|
|
109
|
-
|
|
109
|
+
// 手动注入 webpack-dev-server 客户端(全局安装时需要)
|
|
110
|
+
const webpackDevServerPath = require.resolve('webpack-dev-server/client', { paths: [cliDir] })
|
|
111
|
+
const entryFiles = [
|
|
112
|
+
`${webpackDevServerPath}?http://localhost:${port}`,
|
|
113
|
+
'webpack/hot/dev-server',
|
|
114
|
+
'regenerator-runtime/runtime',
|
|
115
|
+
entryPackageFile,
|
|
116
|
+
]
|
|
110
117
|
|
|
111
118
|
module.exports = {
|
|
112
119
|
mode: 'development',
|
|
@@ -115,9 +122,6 @@ module.exports = {
|
|
|
115
122
|
devServer: {
|
|
116
123
|
port,
|
|
117
124
|
hot: true,
|
|
118
|
-
devMiddleware: {
|
|
119
|
-
writeToDisk: true,
|
|
120
|
-
},
|
|
121
125
|
proxy: [
|
|
122
126
|
{
|
|
123
127
|
context: ['/proxy'],
|