M
M
misterobot4042019-12-26 13:38:26
Vue.js
misterobot404, 2019-12-26 13:38:26

Asynchronous imports not working?

Started refactoring the code and found out that dynamic import won't work without require("./components/Constructor/ConstructorControlPanel")

import bootstrap from 'bootstrap'
window.bootstrap = bootstrap;
import vue from "vue";
window.Vue = vue;
import store from './store/store'
require("./components/Constructor/ConstructorControlPanel");

new Vue({
    el: '#app',
    components: {
        Manager: () => import(/* webpackChunkName: "Manager" */ './components/Manager'),
        Constructor: () => import(/* webpackChunkName: "Constructor" */ './components/Constructor'),
        Viewer: () => import(/* webpackChunkName: "Viewer" */ './components/Viewer'),
    },
    store,
    beforeMount() {
        this.$store.dispatch('initStore');
    }
});

Error 5e048d0ae9668644282077.pngAny ideas?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question