Vue-Cli template/TypeScript support?
See original GitHub issueI started my project with the new vue-cli builder (it’d be great to have a template for vue-babylonjs to help getting started easier).
Anyway, since I set my project up with TypeScript, I’m having trouble importing vue-babylonjs in my main.ts file:
Could not find a declaration file for module 'vue-babylonjs'. 'node_modules/vue-babylonjs/dist/umd.js' implicitly has an 'any' type.
Because of that I think I’m not importing the lib correctly, I tried just Vue.use(require('vue-babylonjs'));
instead, but am getting an error of Unknown custom element: <Scene>
when I load my component/page.
Any advice? Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Using Vue with TypeScript - Vue.js
Vue is written in TypeScript itself and provides first-class TypeScript support. All official Vue packages come with bundled type declarations that should ...
Read more >How to use Vue 3 with TypeScript - LogRocket Blog
Now that Vue officially supports TypeScript, it's easy to create TypeScript projects from scratch using only the Vue CLI without any ...
Read more >w3tecch/vue-typescript-template - GitHub
GitHub - w3tecch/vue-typescript-template: A full-featured Webpack + vue-loader ... A full featured vue-cli TypeScript and Webpack template for Vue.js 2.0
Read more >@vue/cli-plugin-typescript - npm
typescript plugin for vue-cli. Latest version: 5.0.8, last published: 6 months ago. Start using @vue/cli-plugin-typescript in your project ...
Read more >VUE. How on TypeScript support in template? - Stack Overflow
I think is indifferent for <template> tag, it's like an "HTML" with dynamic data being received so I think Vue will only care...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah when Babylonjs 4 is good I plan on releasing a build with some new features. For now there’s not much point to restructuring the build more than once. As for the CLI template, I’ll probably release that with 1.0 stable.
TypeScript typings support is something I’m definitely interested in adding, but I probably won’t start to prioritize it until after Vue 3 is out. There’s definitely a lot that could be done to integrate the typings with Babylon.js as well. I’m on the fence about switching the source code of this library to TS, but I believe there’s ways to do it without switching the source. If you have any ideas or comments here I’m all ears.