@quicktvui/web-cli 1.0.0-beta.24 → 1.0.0-beta.25
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/bin/qt-web-cli.js +7 -4
- package/package.json +1 -1
package/bin/qt-web-cli.js
CHANGED
|
@@ -170,13 +170,16 @@ async function main() {
|
|
|
170
170
|
signale.warn(`检测到 OpenSSL ${process.versions.openssl},已添加 --openssl-legacy-provider`)
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
// 构建 webpack 命令
|
|
174
|
-
const
|
|
173
|
+
// 构建 webpack 命令 - 使用 web-cli 自带的 webpack-cli
|
|
174
|
+
const webpackCliPath = require.resolve('webpack-cli/bin/cli.js', {
|
|
175
|
+
paths: [path.resolve(__dirname, '..')],
|
|
176
|
+
})
|
|
177
|
+
const webpackArgs = [webpackCliPath, 'serve', `--config "${webpackConfigPath}"`, `--port ${args.port}`, '--color']
|
|
175
178
|
|
|
176
179
|
const envPrefix = nodeOptions ? `NODE_OPTIONS="${nodeOptions}" ` : ''
|
|
177
|
-
const webpackCmd = `${envPrefix}
|
|
180
|
+
const webpackCmd = `${envPrefix}node ${webpackArgs.join(' ')}`
|
|
178
181
|
|
|
179
|
-
signale.pending(`执行: ${
|
|
182
|
+
signale.pending(`执行: webpack serve --port ${args.port}`)
|
|
180
183
|
|
|
181
184
|
// 如果需要打开浏览器,等待服务器就绪后打开
|
|
182
185
|
if (args.open) {
|