@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 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 webpackArgs = ['serve', `--config "${webpackConfigPath}"`, `--port ${args.port}`, '--color']
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}npx webpack ${webpackArgs.join(' ')}`
180
+ const webpackCmd = `${envPrefix}node ${webpackArgs.join(' ')}`
178
181
 
179
- signale.pending(`执行: ${webpackCmd}`)
182
+ signale.pending(`执行: webpack serve --port ${args.port}`)
180
183
 
181
184
  // 如果需要打开浏览器,等待服务器就绪后打开
182
185
  if (args.open) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quicktvui/web-cli",
3
- "version": "1.0.0-beta.24",
3
+ "version": "1.0.0-beta.25",
4
4
  "description": "CLI tool for QuickTVUI web development - zero configuration",
5
5
  "author": "QuickTVUI Team",
6
6
  "license": "Apache-2.0",