Skip to content

transpileDependencies doesn't work on windows #2251

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

Closed
MarvinXu opened this issue Aug 16, 2018 · 3 comments · Fixed by #2379
Closed

transpileDependencies doesn't work on windows #2251

MarvinXu opened this issue Aug 16, 2018 · 3 comments · Fixed by #2379
Assignees

Comments

@MarvinXu
Copy link
Contributor

MarvinXu commented Aug 16, 2018

Version

3.0.1

Reproduction link

https://github.com/MarvinXu/vue-cli-transpile-test

Node and OS info

Node 9.6.1 / npm 5.6.0 / window 7

Steps to reproduce

// vue.config.js
module.exports = {
  transpileDependencies: ['@my/module']
}
// node_modules/@my/module/index.js
let somevar = '@my/module';
document.writeln(somevar);
npm run build

What is expected?

transpile specified node_module correctly

What is actually happening?

not transpile node_module
image

@yyx990803
Copy link
Member

Cannot reproduce, it's working as intended. Closed until a valid reproduction is provided.

@MarvinXu
Copy link
Contributor Author

@yyx990803 I kind of figured it out. This problem has nothing to do with 'dev mode' but with OS. I'm using Windows and the compiler machine is Linux.

if (options.transpileDependencies.some(dep => filepath.match(dep))) {

On windows, modules with a namespace (eg: @my/module) won't match in the above code.

@MarvinXu MarvinXu changed the title transpileDependencies doesn't work in dev mode transpileDependencies doesn't work on windows Aug 28, 2018
@yyx990803 yyx990803 reopened this Aug 28, 2018
@yyx990803
Copy link
Member

@sodatea should be an easy fix

@haoqunjiang haoqunjiang self-assigned this Aug 28, 2018
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Aug 28, 2018
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants