Skip to content

error of default is not a function with systemjs-importmap #357

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
viT-1 opened this issue Aug 21, 2019 · 4 comments · Fixed by #383
Closed

error of default is not a function with systemjs-importmap #357

viT-1 opened this issue Aug 21, 2019 · 4 comments · Fixed by #383

Comments

@viT-1
Copy link

viT-1 commented Aug 21, 2019

systemjs-importmap.json:

{
	"imports": {
		"vue": "https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js",
		"vue-class-component": "https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-class-component.min.js"
	}
} 

Adding vue-class-component decorator to my Vue repo caused an error
TypeError: vue_class_component_1.default is not a function

Way to reproduce:

  1. npm run deploy
  2. npm run www
  3. browser loading http://localhost:3000/
@viT-1
Copy link
Author

viT-1 commented Aug 21, 2019

related: systemjs/systemjs#1989

@ktsn
Copy link
Member

ktsn commented Jan 11, 2020

This is because the way UMD build exposes the decorator is different with ESModule. Using ESM build should fix the problem.

@viT-1
Copy link
Author

viT-1 commented Feb 27, 2020

@ktsn Thank you for new vue-class-component version! Waiting for vue-property-decorator version update (with esm support).

@ktsn
Copy link
Member

ktsn commented Feb 27, 2020

/cc @kaorun343

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.

2 participants