nativescript-vue: when using Vue.extend() the template block doesn't work
So instead of
export default {
data
methods
...
}
If I instead do
export default Vue.extend({
data
methods
...
})
Then the template is not loaded and I get You are running a runtime-only build of Vue
warning. (Which is supposed to happen if template is string, or el is id, and no render function exists)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (12 by maintainers)
Okay I have fixed this.
Here we go, how to use Typescript decorators with Vue
1. We need the original
vue
package for typedefsBut we don’t want to actually use vue in runtime
2. Make sure all
vue
imports are actuallynativescript-vue
importsIn your webpack config
3. Get class style decoration dependencies
4. Write class style components