typescript cannt work with meteor 1.8.2
SvenWangChina opened this issue Ā· comments
Sven Wang commented
I use this package for Meteor.js 1.8.2, I get follow error on console:
[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.(found in <Root>)
warn @ modules.js?hash=d4212565fba3863c67881653b3ce429ef6ecae68:1723
mountComponent @ modules.js?hash=d4212565fba3863c67881653b3ce429ef6ecae68:5127
Vue.$mount @ modules.js?hash=d4212565fba3863c67881653b3ce429ef6ecae68:9513
Vue._init @ modules.js?hash=d4212565fba3863c67881653b3ce429ef6ecae68:6116
Vue @ modules.js?hash=d4212565fba3863c67881653b3ce429ef6ecae68:6183
(anonymous) @ index.ts:16
(anonymous) @ index.ts:6
maybeReady @ meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:938
loadingCompleted @ meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:950
The example linkļ¼https://github.com/SvenWangChina/meteor-vue-typescript-example.git
Can someone help me fix the bug? Thanks very much.
Sven Wang commented
I fixed the bug when edit imports/app/index.ts
:
import Vue from 'vue';
import VueRouter from 'vue-router';
import './initPlugins';
import routes from './routes';
import App from '../ui/layouts/App/index.vue';
export default () => {
const router = new VueRouter({
routes,
mode: 'history',
});
return {
router,
app: new Vue({
router,
render: (h: any) => h(App),
el: '#app',
}),
};
};