Skip to content

Fix rollup problem not exporting Vue as the default element. So using NS-vue from TS is harder #301

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

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

msaelices
Copy link

Probably there is a more elegant issue, but I'm not a roll-up expert.

See #300.

@msaelices msaelices requested a review from rigor789 August 7, 2018 03:13
@codecov-io
Copy link

Codecov Report

Merging #301 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #301      +/-   ##
==========================================
- Coverage   14.23%   14.22%   -0.02%     
==========================================
  Files          41       41              
  Lines        1145     1146       +1     
  Branches      269      269              
==========================================
  Hits          163      163              
- Misses        982      983       +1
Impacted Files Coverage Δ
platform/nativescript/framework.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 259640e...3254994. Read the comment docs.

@championswimmer
Copy link
Contributor

errr you can just use esModuleInterop: true in your tsconfig.json :D

@championswimmer
Copy link
Contributor

@msaelices
Copy link
Author

msaelices commented Aug 8, 2018

@championswimmer it does not works for me. I've added these lines:

        "allowSyntheticDefaultImports": true,
        "esModuleInterop": true,
        "importHelpers": true,

but when I put this main.js code:

import Vue from 'nativescript-vue'
import Foo from 'nativescript-foo'

Vue.use(Foo)

I receive this error:

System.err: Error calling module function 
System.err: TypeError: Cannot read property 'use' of undefined
...

@msaelices
Copy link
Author

msaelices commented Aug 8, 2018

@championswimmer BTW, I think the dirty fix is better because is universal. I mean, it does not depend on the developer's webpack configuration. It will make import Vue from 'nativescript-vue' work always.

CC/ @rigor789

@rigor789 rigor789 merged commit 7e39039 into master Aug 8, 2018
@rigor789 rigor789 deleted the fix-typescript-default-issue branch December 5, 2022 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants