vue3 项目中如何输出webpack的config.js

这个配置文件的获取方法:

Microsoft Windows [版本 10.0.16299.1932]
(c) 2017 Microsoft Corporation。保留所有权利。

C:\Users\easygoo>d:

D:\>cd vue3\case1

D:\vue3\case1>dir
 驱动器 D 中的卷是 V9
 卷的序列号是 96FC-9BAC

 D:\vue3\case1 的目录

2021-05-29  18:12    

         .
2021-05-29  18:12              ..
2021-05-29  08:19               231 .gitignore
2021-05-29  08:19                73 babel.config.js
2021-05-29  18:12              dist
2021-05-29  17:38              node_modules
2021-05-29  08:20           474,025 package-lock.json
2021-05-29  17:38               855 package.json
2021-05-29  08:19              public
2021-05-29  08:20               317 README.md
2021-05-29  08:19              src
               5 个文件        475,501 字节
               6 个目录 120,330,248,192 可用字节

D:\vue3\case1>vue-cli-service inspect
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module '@vue/cli-plugin-babel'
Require stack:
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at idToPlugin (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:145:14)
    at D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:184:20
    at Array.map ()
    at Service.resolvePlugins (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:170:10)
    at new Service (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:32:25)
    at Object. (D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js:15:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\nodejs\\node-global\\node_modules\\@vue\\cli-service\\lib\\Service.js',
    'D:\\nodejs\\node-global\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js'
  ]
}

D:\vue3\case1>vue-cli-service inspect --mode production
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module '@vue/cli-plugin-babel'
Require stack:
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at idToPlugin (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:145:14)
    at D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:184:20
    at Array.map ()
    at Service.resolvePlugins (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:170:10)
    at new Service (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:32:25)
    at Object. (D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js:15:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\nodejs\\node-global\\node_modules\\@vue\\cli-service\\lib\\Service.js',
    'D:\\nodejs\\node-global\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js'
  ]
}

D:\vue3\case1>vue inspect > output.js

D:\vue3\case1>vue inspect --mode production > output.prod.js

D:\vue3\case1>vue-cli-service inspect --mode production > output.prod.js
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module '@vue/cli-plugin-babel'
Require stack:
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at idToPlugin (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:145:14)
    at D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:184:20
    at Array.map ()
    at Service.resolvePlugins (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:170:10)
    at new Service (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:32:25)
    at Object. (D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js:15:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\nodejs\\node-global\\node_modules\\@vue\\cli-service\\lib\\Service.js',
    'D:\\nodejs\\node-global\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js'
  ]
}

D:\vue3\case1>cnpm i -g @vue/cli-plugin-babel
Downloading @vue/cli-plugin-babel to D:\nodejs\node-global\node_modules\@vue\cli-plugin-babel_tmp
Copying D:\nodejs\node-global\node_modules\@vue\cli-plugin-babel_tmp\_@[email protected]@@vue\cli-plugin-babel to D:\nodejs\node-global\node_modules\@vue\cli-plugin-babel
Installing @vue/cli-plugin-babel's dependencies to D:\nodejs\node-global\node_modules\@vue\cli-plugin-babel/node_modules
[1/7] thread-loader@^2.1.3 installed at node_modules\[email protected]@thread-loader
[2/7] cache-loader@^4.1.0 installed at node_modules\[email protected]@cache-loader
[3/7] @babel/core@^7.11.0 installed at node_modules\_@[email protected]@@babel\core
[4/7] @vue/cli-shared-utils@^4.5.13 installed at node_modules\_@[email protected]@@vue\cli-shared-utils
[email protected] download from binary mirror: {"host":"https://cdn.npm.taobao.org/dist/fsevents"}
platform unsupported [email protected][email protected][email protected][email protected] › fsevents@^1.2.7 Package require os(darwin) not compatible with your platform(win32)
platform unsupported [email protected][email protected][email protected] › fsevents@~2.3.1 Package require os(darwin) not compatible with your platform(win32)
[fsevents@^1.2.7] optional install error: Package require os(darwin) not compatible with your platform(win32)
[fsevents@~2.3.1] optional install error: Package require os(darwin) not compatible with your platform(win32)
[5/7] babel-loader@^8.1.0 installed at node_modules\[email protected]@babel-loader
[6/7] webpack@^4.0.0 installed at node_modules\[email protected]@webpack
[7/7] @vue/babel-preset-app@^4.5.13 installed at node_modules\_@[email protected]@@vue\babel-preset-app
execute post install 1 scripts...
[1/1] scripts.postinstall @vue/[email protected] › core-js@^3.6.5 run "node -e \"try{require('./postinstall')}catch(e){}\"", root: "D:\\nodejs\\node-global\\node_modules\\@vue\\cli-plugin-babel\\node_modules\\[email protected]@core-js"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

[1/1] scripts.postinstall @vue/[email protected] › core-js@^3.6.5 finished in 696ms
peerDependencies WARNING @vue/babel-preset-app@^4.5.13 requires a peer of vue@^2 || ^3.0.0-0 but none was installed
deprecate @vue/[email protected] › request@^2.88.2 request has been deprecated, see https://github.com/request/request/issues/3142
deprecate @vue/[email protected] › @hapi/joi@^15.0.1 joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
deprecate @vue/[email protected][email protected] › har-validator@~5.1.3 this library is no longer supported
deprecate @vue/[email protected] › @hapi/[email protected] › @hapi/[email protected] Moved to 'npm install @sideway/address'
deprecate @vue/[email protected] › @hapi/[email protected] › @hapi/[email protected] This version has been deprecated and is no longer supported or maintained
deprecate @vue/[email protected] › @hapi/[email protected] › @hapi/[email protected] This version has been deprecated and is no longer supported or maintained
deprecate @vue/[email protected] › @hapi/[email protected] › @hapi/[email protected] This version has been deprecated and is no longer supported or maintained
deprecate [email protected][email protected][email protected] › chokidar@^2.1.8 Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
deprecate [email protected][email protected][email protected][email protected] › fsevents@^1.2.7 fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
deprecate [email protected][email protected][email protected][email protected] › resolve-url@^0.2.1 https://github.com/lydell/resolve-url#deprecated
deprecate [email protected][email protected][email protected][email protected] › urix@^0.1.0 Please see https://github.com/lydell/urix#deprecated
Recently updated (since 2021-05-22): 20 packages (detail see file D:\nodejs\node-global\node_modules\@vue\cli-plugin-babel\node_modules\.recently_updates.txt)
  Today:
    → @babel/[email protected] › @babel/helper-compilation-targets@^7.13.16(7.14.4) (01:00:00)
    → @babel/[email protected] › @babel/[email protected] › @babel/compat-data@^7.14.4(7.14.4) (00:59:46)
    → @babel/[email protected] › @babel/types@^7.14.2(7.14.4) (00:59:53)
    → @babel/[email protected] › @babel/parser@^7.14.3(7.14.4) (00:59:46)
    → @babel/[email protected] › @babel/[email protected] › @babel/helper-replace-supers@^7.13.12(7.14.4) (01:00:00)
    → @babel/[email protected] › @babel/[email protected][email protected] › electron-to-chromium@^1.3.723(1.3.742) (06:02:37)
    → @vue/[email protected] › @babel/preset-env@^7.11.0(7.14.4) (01:00:09)
    → @vue/[email protected] › @babel/[email protected] › @babel/helper-create-class-features-plugin@^7.14.2(7.14.4) (01:00:06)
    → @vue/[email protected] › @babel/[email protected] › @babel/plugin-proposal-object-rest-spread@^7.14.4(7.14.4) (01:00:06)
    → @vue/[email protected] › @babel/[email protected][email protected] › core-js-compat@^3.9.1(3.13.1) (17:00:48)
    → @vue/[email protected] › @babel/[email protected] › @babel/plugin-transform-block-scoping@^7.14.4(7.14.4) (00:59:46)
    → @vue/[email protected] › @babel/[email protected] › @babel/plugin-transform-destructuring@^7.14.4(7.14.4) (00:59:49)
    → @vue/[email protected] › @babel/[email protected] › @babel/plugin-transform-classes@^7.14.4(7.14.4) (01:00:06)
    → @vue/[email protected] › core-js@^3.6.5(3.13.1) (17:00:50)
  2021-05-26
    → @babel/[email protected] › @babel/[email protected][email protected] › caniuse-lite@^1.0.30001219(1.0.30001230) (03:22:58)
    → @vue/[email protected] › @babel/[email protected] › babel-plugin-polyfill-corejs2@^0.2.0(0.2.2) (18:10:31)
    → @vue/[email protected] › @babel/[email protected] › babel-plugin-polyfill-corejs3@^0.2.0(0.2.2) (18:10:31)
    → @vue/[email protected] › @babel/[email protected] › babel-plugin-polyfill-regenerator@^0.2.0(0.2.2) (18:10:32)
    → @vue/[email protected] › @babel/[email protected][email protected] › @babel/helper-define-polyfill-provider@^0.2.2(0.2.3) (18:36:13)
  2021-05-25
    → @vue/[email protected][email protected][email protected][email protected] › path-parse@^1.0.6(1.0.7) (20:57:37)
All packages installed (594 packages installed from npm registry, used 12s(network 11s), speed 799.58kB/s, json 536(1.36MB), tarball 6.96MB)

D:\vue3\case1>vue-cli-service inspect --mode production > output.prod.js
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module '@vue/cli-plugin-eslint'
Require stack:
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at idToPlugin (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:145:14)
    at D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:184:20
    at Array.map ()
    at Service.resolvePlugins (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:170:10)
    at new Service (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:32:25)
    at Object. (D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js:15:17) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\nodejs\\node-global\\node_modules\\@vue\\cli-service\\lib\\Service.js',
    'D:\\nodejs\\node-global\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js'
  ]
}

D:\vue3\case1>cnpm i -g @vue/cli-plugin-eslint
Downloading @vue/cli-plugin-eslint to D:\nodejs\node-global\node_modules\@vue\cli-plugin-eslint_tmp
Copying D:\nodejs\node-global\node_modules\@vue\cli-plugin-eslint_tmp\_@[email protected]@@vue\cli-plugin-eslint to D:\nodejs\node-global\node_modules\@vue\cli-plugin-eslint
Installing @vue/cli-plugin-eslint's dependencies to D:\nodejs\node-global\node_modules\@vue\cli-plugin-eslint/node_modules
[1/6] yorkie@^2.0.0 installed at node_modules\[email protected]@yorkie
[2/6] eslint-loader@^2.2.1 installed at node_modules\[email protected]@eslint-loader
[email protected] download from binary mirror: {"host":"https://cdn.npm.taobao.org/dist/fsevents"}
platform unsupported [email protected][email protected][email protected][email protected] › fsevents@^1.2.7 Package require os(darwin) not compatible with your platform(win32)
platform unsupported [email protected][email protected][email protected] › fsevents@~2.3.1 Package require os(darwin) not compatible with your platform(win32)
[fsevents@^1.2.7] optional install error: Package require os(darwin) not compatible with your platform(win32)
[fsevents@~2.3.1] optional install error: Package require os(darwin) not compatible with your platform(win32)
[3/6] inquirer@^7.1.0 installed at node_modules\[email protected]@inquirer
[4/6] globby@^9.2.0 installed at node_modules\[email protected]@globby
[5/6] webpack@^4.0.0 installed at node_modules\[email protected]@webpack
[npminstall:get] retry GET https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz after 100ms, retry left 4, error: Error: connect ETIMEDOUT 113.137.54.239:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '113.137.54.239',
  port: 443,
  name: 'RequestError',
  data: undefined,
  path: '/execa/-/execa-1.0.0.tgz',
  status: -1,
  headers: {},
  res: [Object]
}, status: -1, headers: {},
stack: Error: connect ETIMEDOUT 113.137.54.239:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
[6/6] @vue/cli-shared-utils@^4.5.13 installed at node_modules\_@[email protected]@@vue\cli-shared-utils
execute post install 1 scripts...
[1/1] scripts.install yorkie@^2.0.0 run "node bin/install.js", root: "D:\\nodejs\\node-global\\node_modules\\@vue\\cli-plugin-eslint\\node_modules\\[email protected]@yorkie"
setting up Git hooks
trying to install from sub 'node_module' directory, skipping Git hooks installation
[1/1] scripts.install yorkie@^2.0.0 finished in 224ms
peerDependencies WARNING eslint-loader@^2.2.1 requires a peer of eslint@>=1.6.0 <7.0.0 but none was installed
deprecate @vue/[email protected] › request@^2.88.2 request has been deprecated, see https://github.com/request/request/issues/3142
deprecate @vue/[email protected][email protected] › har-validator@~5.1.3 this library is no longer supported
deprecate @vue/[email protected] › @hapi/joi@^15.0.1 joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
deprecate @vue/[email protected] › @hapi/[email protected] › @hapi/[email protected] This version has been deprecated and is no longer supported or maintained
deprecate @vue/[email protected] › @hapi/[email protected] › @hapi/[email protected] This version has been deprecated and is no longer supported or maintained
deprecate @vue/[email protected] › @hapi/[email protected] › @hapi/[email protected] Moved to 'npm install @sideway/address'
deprecate @vue/[email protected] › @hapi/[email protected] › @hapi/[email protected] This version has been deprecated and is no longer supported or maintained
deprecate [email protected][email protected][email protected][email protected][email protected] › resolve-url@^0.2.1 https://github.com/lydell/resolve-url#deprecated
deprecate [email protected][email protected][email protected][email protected][email protected] › urix@^0.1.0 Please see https://github.com/lydell/urix#deprecated
deprecate [email protected][email protected][email protected] › chokidar@^2.1.8 Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
deprecate [email protected][email protected][email protected][email protected] › fsevents@^1.2.7 fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
Recently updated (since 2021-05-22): 2 packages (detail see file D:\nodejs\node-global\node_modules\@vue\cli-plugin-eslint\node_modules\.recently_updates.txt)
  2021-05-25
    → [email protected] › @types/[email protected] › @types/node@*(15.6.1) (08:02:15)
    → @vue/[email protected][email protected][email protected][email protected] › path-parse@^1.0.6(1.0.7) (20:57:37)
All packages installed (489 packages installed from npm registry, used 23s(network 22s), speed 359.01kB/s, json 424(988.87kB), tarball 6.72MB)

D:\vue3\case1>vue-cli-service inspect --mode production > output.prod.js

D:\vue3\case1>vue-cli-service inspect --mode production > output.prod.js
 ERROR  Error: Cannot find module 'vue-loader-v16/package.json'
Require stack:
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\config\base.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js
Error: Cannot find module 'vue-loader-v16/package.json'
Require stack:
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\config\base.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at D:\nodejs\node-global\node_modules\@vue\cli-service\lib\config\base.js:114:23
    at D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:236:40
    at Array.forEach ()
    at Service.resolveChainableWebpackConfig (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:236:26)
    at Service.resolveWebpackConfig (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:240:48)
    at PluginAPI.resolveWebpackConfig (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\PluginAPI.js:132:25)

D:\vue3\case1>cnpm i -g vue-loader-v16
Downloading vue-loader-v16 to D:\nodejs\node-global\node_modules\vue-loader-v16_tmp
Copying D:\nodejs\node-global\node_modules\vue-loader-v16_tmp\[email protected]@vue-loader-v16 to D:\nodejs\node-global\node_modules\vue-loader-v16
Installing vue-loader-v16's dependencies to D:\nodejs\node-global\node_modules\vue-loader-v16/node_modules
[1/6] hash-sum@^2.0.0 installed at node_modules\[email protected]@hash-sum
[2/6] source-map@^0.6.1 installed at node_modules\[email protected]@source-map
[3/6] merge-source-map@^1.1.0 installed at node_modules\[email protected]@merge-source-map
[4/6] chalk@^3.0.0 installed at node_modules\[email protected]@chalk
[5/6] loader-utils@^1.2.3 installed at node_modules\[email protected]@loader-utils
[6/6] @types/mini-css-extract-plugin@^0.9.1 installed at node_modules\_@[email protected]@@types\mini-css-extract-plugin
Recently updated (since 2021-05-22): 6 packages (detail see file D:\nodejs\node-global\node_modules\vue-loader-v16\node_modules\.recently_updates.txt)
  Today:
    → @types/[email protected] › @types/[email protected][email protected][email protected] › electron-to-chromium@^1.3.723(1.3.742) (06:02:37)
  2021-05-28
    → @types/[email protected] › @types/[email protected] › webpack@^5(5.38.1) (05:12:50)
  2021-05-27
    → @types/[email protected] › @types/[email protected][email protected] › @types/[email protected] › @types/eslint@*(7.2.12) (09:01:40)
    → @types/[email protected] › @types/[email protected][email protected] › webpack-sources@^2.3.0(2.3.0) (18:01:50)
  2021-05-26
    → @types/[email protected] › @types/[email protected][email protected][email protected] › caniuse-lite@^1.0.30001219(1.0.30001230) (03:22:58)
  2021-05-25
    → @types/[email protected] › @types/[email protected] › @types/node@*(15.6.1) (08:02:15)
All packages installed (86 packages installed from npm registry, used 5s(network 5s), speed 719.58kB/s, json 84(501.89kB), tarball 2.88MB)

D:\vue3\case1>vue-cli-service inspect --mode production > output.prod.js
 ERROR  Error: Cannot find module '@vue/compiler-sfc/package.json'
Require stack:
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\config\base.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js
Error: Cannot find module '@vue/compiler-sfc/package.json'
Require stack:
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\config\base.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js
- D:\nodejs\node-global\node_modules\@vue\cli-service\bin\vue-cli-service.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at D:\nodejs\node-global\node_modules\@vue\cli-service\lib\config\base.js:115:30
    at D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:236:40
    at Array.forEach ()
    at Service.resolveChainableWebpackConfig (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:236:26)
    at Service.resolveWebpackConfig (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\Service.js:240:48)
    at PluginAPI.resolveWebpackConfig (D:\nodejs\node-global\node_modules\@vue\cli-service\lib\PluginAPI.js:132:25)

D:\vue3\case1>cnpm i -g @vue/compiler-sfc
Downloading @vue/compiler-sfc to D:\nodejs\node-global\node_modules\@vue\compiler-sfc_tmp
Copying D:\nodejs\node-global\node_modules\@vue\compiler-sfc_tmp\_@[email protected]@@vue\compiler-sfc to D:\nodejs\node-global\node_modules\@vue\compiler-sfc
Installing @vue/compiler-sfc's dependencies to D:\nodejs\node-global\node_modules\@vue\compiler-sfc/node_modules
[1/16] @babel/parser@^7.13.9 installed at node_modules\_@[email protected]@@babel\parser
[2/16] hash-sum@^2.0.0 installed at node_modules\[email protected]@hash-sum
[3/16] @vue/[email protected] installed at node_modules\_@[email protected]@@vue\shared
[4/16] estree-walker@^2.0.1 installed at node_modules\[email protected]@estree-walker
[5/16] @vue/[email protected] installed at node_modules\_@[email protected]@@vue\compiler-ssr
[6/16] @vue/[email protected] installed at node_modules\_@[email protected]@@vue\compiler-dom
[7/16] lru-cache@^5.1.1 installed at node_modules\[email protected]@lru-cache
[8/16] source-map@^0.6.1 existed at node_modules\[email protected]@source-map
[9/16] @babel/types@^7.13.0 installed at node_modules\_@[email protected]@@babel\types
[10/16] merge-source-map@^1.1.0 installed at node_modules\[email protected]@merge-source-map
[11/16] @vue/[email protected] installed at node_modules\_@[email protected]@@vue\compiler-core
[12/16] magic-string@^0.25.7 installed at node_modules\[email protected]@magic-string
[13/16] postcss-selector-parser@^6.0.4 installed at node_modules\[email protected]@postcss-selector-parser
[14/16] consolidate@^0.16.0 installed at node_modules\[email protected]@consolidate
[15/16] postcss@^8.1.10 installed at node_modules\[email protected]@postcss
[16/16] postcss-modules@^4.0.0 installed at node_modules\[email protected]@postcss-modules
Recently updated (since 2021-05-22): 2 packages (detail see file D:\nodejs\node-global\node_modules\@vue\compiler-sfc\node_modules\.recently_updates.txt)
  Today:
    → @babel/parser@^7.13.9(7.14.4) (00:59:46)
    → @babel/types@^7.13.0(7.14.4) (00:59:53)
All packages installed (41 packages installed from npm registry, used 3s(network 3s), speed 554.11kB/s, json 41(131.27kB), tarball 1.66MB)

D:\vue3\case1>vue-cli-service inspect --mode production > output.prod.js

D:\vue3\case1>

缺少的lib,按照提示安装完后,才能正确执行命令vue-cli-service inspect --mode production > output.prod.js

你可能感兴趣的:(vue.js,web,app)