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

Imported un-transpiled module is not transpiled when component under test is mounted #689

Closed
MartinPeverelli opened this issue Jun 7, 2018 · 1 comment

Comments

@MartinPeverelli
Copy link

Version

1.0.0-beta.16

Reproduction link

https://github.com/MartinPeverelli/reproduction-component

Steps to reproduce

  • git clone git@github.com:MartinPeverelli/reproduction-component.git
  • npm install
  • npm run test:unit

What is expected?

Tests should pass

What is actually happening?

Tests fail with the following:

(function (exports, require, module, __filename, __dirname) { import ReproductionModule from './ReproductionModule'
                                                              ^^^^^^
SyntaxError: Unexpected token import

Custom module ReproductionModule is not transpiled.
The serve and build processes work as expected, but the test:unit process does not transpile the imported component on the fly.

@eddyerburgh
Copy link
Member

Thanks for the reproduction.

This is actually an issue for the @vue/cli repo. The problem is that the modules aren't compile by babel, I'll try to look into it if I get time, but you should make an issue in the vue-cli repo so we can track it effectively.

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

No branches or pull requests

2 participants