Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The preset in the second use will merge the preset in the first use #4778

Closed
Jim-Rae opened this issue Oct 31, 2019 · 1 comment · Fixed by #4922
Closed

The preset in the second use will merge the preset in the first use #4778

Jim-Rae opened this issue Oct 31, 2019 · 1 comment · Fixed by #4922

Comments

@Jim-Rae
Copy link

Jim-Rae commented Oct 31, 2019

Version

3.11.0

Environment info

System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.771.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.0.0
    @vue/babel-preset-app:  3.11.0
    @vue/babel-preset-jsx:  1.1.0
    @vue/babel-sugar-functional-vue:  1.0.0
    @vue/babel-sugar-inject-h:  1.0.0
    @vue/babel-sugar-v-model:  1.0.0
    @vue/babel-sugar-v-on:  1.1.0
    @vue/component-compiler-utils:  3.0.0
    vue:  2.6.10
    vue-hot-reload-api:  2.3.3
    vue-loader:  15.7.1
    vue-router:  3.1.2
    vue-server-renderer:  2.6.10
    vue-style-loader:  4.1.2
    vue-template-compiler:  2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuepress: ^1.0.3 => 1.0.3
    vuepress-html-webpack-plugin:  3.2.0
    vuepress-plugin-container:  2.0.2
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

  1. Run the command "vue create --preset Jim-Rae/vue-cli3-preset-jr-ts my-project-ts" in terminal.

  2. Run the command "vue create --preset Jim-Rae/vue-cli3-preset-jr my-project" in terminal.

  3. After these two steps, check the "my-project/src/" directory, you will find that this directory contains some files belong to "my-project-ts/src/" directory, such as "shims-tsx.d.ts", "shims-vue.d.ts" and so on.

What is expected?

The presets used each time are independent

What is actually happening?

The preset in the second use will merge the preset in the first use


I found the reason after I read the source code of "vue-cli". That code shows that "vue-cli" will download remote preset to the same directory named "vue-cli" in the temporary directory each time, so the preset in the second use will merge the preset in the first use.

@sodatea
Copy link
Member

sodatea commented Nov 2, 2019

Yeah, we forgot to test thread safety at all. It is a bug. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants