Skip to content

modern mode doesn't work with typescript #1577

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
troy351 opened this issue Jun 15, 2018 · 1 comment
Closed

modern mode doesn't work with typescript #1577

troy351 opened this issue Jun 15, 2018 · 1 comment

Comments

@troy351
Copy link
Contributor

troy351 commented Jun 15, 2018

Version

3.0.0-rc.1

Reproduction link

no need

Steps to reproduce

create vue project with the steps below

  1. vue create demo
  2. Manually select features
  3. Babel && TypeScript
  4. N
  5. Y
  6. In dedicated config files
  7. N

After finish, run vue-cli-service build --modern.

What is expected?

bundles should be different

What is actually happening?

check dist/app.hash.js and dist/app-legacy.hash.js, they are identical except the source map comment part.


In pure js project, the modern bundle using arrow function for render function while the legacy bundle using function declaration.
In ts project, both bundles using function declaration.

@archseer
Copy link

@yyx990803 I think it still doesn't work on typescript:

-rw-r--r--   1 speed  staff   394K Sep 19 18:49 app-legacy.49d50903.js
-rw-r--r--   1 speed  staff   394K Sep 19 18:50 app.b75421a2.js

I also can't find the arrow function used anywhere in the modern bundle:

$ rg "=>" app.b75421a2.js
(empty)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants