-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Description
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 :
- Clarify the documentation to explain that this option will search for the terms in the whole path
- Change
transpileDependencies
to only look at node module names (for exampletranspileDependencies: ['vuetify']
will be equivalent to/home/aymkdn/projects/vuetify/my-app/node_modules/vuetify/
) - Add a new parameter, called
transpileModules
that will do the same as option 2 above
haoqunjiang, KaelWD, mehrdad94 and kirillgroshkov