/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})
<script>
import { news, projects } from '../assets/db.json'
export default {
name: 'Home',
data () {
return {
news,
projects
}
}
}
</script>
import Vue from 'vue';
Vue.prototype.$appName = 'Моё приложение';
...
new Vue({
beforeCreate: function () {
console.log(this.$appName);
}
});