Skip to content

Clarification around transpileDependencies #3057

@Aymkdn

Description

@Aymkdn

What problem does this feature solve?

transpileDependencies searches for the provided terms in the full path, meaning that if we have something like transpileDependencies: ['vuetify'] (see vuetifyjs/vue-cli-plugins#55) then any vuetify in the path will cause Babel to translate the files.

For example, if my path is /home/aymkdn/projects/vuetify/my-app/, EVERYTHING is compiled, causing multiple errors. Even if the path is /home/aymkdn/projects/my-app/ Babel will translate all node modules with "vuetify" in their name (like vue-cli-plugin-vuetify or vuetify-loader)

The expected behavior when reading the documentation is to only compile the module called "vuetify"

What does the proposed API look like?

I see three options here :

  1. Clarify the documentation to explain that this option will search for the terms in the whole path
  2. Change transpileDependencies to only look at node module names (for example transpileDependencies: ['vuetify'] will be equivalent to /home/aymkdn/projects/vuetify/my-app/node_modules/vuetify/)
  3. Add a new parameter, called transpileModules that will do the same as option 2 above

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