Skip to content

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

Closed
@Jim-Rae

Description

@Jim-Rae

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions