Closed
Description
Version
5.0.0-beta.4
Reproduction link
Environment info
Environment Info:
System:
OS: macOS 11.5.2
CPU: (8) arm64 Apple M1
Binaries:
Node: 15.9.0 - ~/.nvm/versions/node/v15.9.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.19.1 - ~/.nvm/versions/node/v15.9.0/bin/npm
Browsers:
Chrome: 93.0.4577.82
Edge: 93.0.961.47
Firefox: 91.0.2
Safari: 14.1.2
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.2.1
@vue/babel-helper-vue-transform-on: 1.0.2
@vue/babel-plugin-jsx: 1.0.7
@vue/babel-plugin-transform-vue-jsx: 1.2.1
@vue/babel-preset-app: 5.0.0-beta.4
@vue/babel-preset-jsx: 1.2.4
@vue/babel-sugar-composition-api-inject-h: 1.2.1
@vue/babel-sugar-composition-api-render-instance: 1.2.4
@vue/babel-sugar-functional-vue: 1.2.2
@vue/babel-sugar-inject-h: 1.2.2
@vue/babel-sugar-v-model: 1.2.3
@vue/babel-sugar-v-on: 1.2.3
@vue/cli-overlay: 5.0.0-beta.4
@vue/cli-plugin-babel: ~5.0.0-beta.4 => 5.0.0-beta.4
@vue/cli-plugin-eslint: ~5.0.0-beta.4 => 5.0.0-beta.4
@vue/cli-plugin-router: 5.0.0-beta.4
@vue/cli-plugin-vuex: 5.0.0-beta.4
@vue/cli-service: ~5.0.0-beta.4 => 5.0.0-beta.4
@vue/cli-shared-utils: 5.0.0-beta.4
@vue/component-compiler-utils: 3.2.2
@vue/web-component-wrapper: 1.3.0
eslint-plugin-vue: ^7.6.0 => 7.17.0
vue: ^2.6.14 => 2.6.14
vue-eslint-parser: 7.11.0
vue-hot-reload-api: 2.3.4
vue-loader: 16.5.0 (15.9.8)
vue-style-loader: 4.1.3
vue-template-compiler: ^2.6.14 => 2.6.14
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
- git clone git@github.com:zj9495/vue-cli5-public-folder-issue.git
- yarn build
- compare the config.js files in the dist and public folders
What is expected?
the config.js file in the public folder should be copied to the dist folder as it is
What is actually happening?
The content of config.js is converted to void 0;
https://github.com/zj9495/vue-cli5-public-folder-issue/blob/master/public/config.js
https://github.com/zj9495/vue-cli5-public-folder-issue/blob/master/dist/config.js
It only happened in @vue/cli 5