When username and password are configured in the .npmrc for the
respective scope, use basic auth when getting package metadata from the
npm registry.
Closes#6206
currently google chrome prevents installing pwa due to the error: “Page does not work offline”. The reason is service worker has to listen to fetch event. It doesnt have to do anything so the listener can be an empty function, but it has to be declared
https://cli.vuejs.org/dev-guide/plugin-dev.html#filename-edge-cases
Although in this passage, it is suggested that we should change ".env" to "_env" to solve the problem of uploading npm packages. But there will also be such a demand, the files in `generator/template` are dynamically pulled from the git repository at runtime, and there may be `.env` files in the repository, so this pr can solve the problem here
Vue CLI v5.0.0-alpha.0 uses `rule.resolve` in the CLI service (see https://github.com/vuejs/vue-cli/blob/v5.0.0-alpha.0/packages/@vue/cli-service/lib/config/base.js#L17-L20) which was introduced in webpack-chain v6.5.0.
As the CLI service defines a dependency to webpack-chain v6.4.0, this causes issues in existing projects when trying to upgrade to the CLi v5.
Upgrading an existing project leads to `yarn build` throwing:
```
TypeError: Cannot read property 'set' of undefined
at /Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/config/base.js:20:19
at /Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/Service.js:240:40
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/Service.js:240:26)
at PluginAPI.resolveChainableWebpackConfig (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/PluginAPI.js:145:25)
at module.exports (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/commands/build/resolveAppConfig.js:9:22)
at build (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/commands/build/index.js:147:50)
at /Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/commands/build/index.js:89:13
at Service.run (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/Service.js:234:12)
at Object.<anonymous> (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/bin/vue-cli-service.js:36:9)
```
This fixes the issue by specifying the necesseray minimal version for webpack-chain.
See https://github.com/vuejs/vue-cli/pull/6023
It's not the ideal solution, though.
In the long run we should have the shim built-in (either in this plugin
or in the `vue-loader` package), for which ESLint rules should be
properly applied, and the user can simply import that shim module.