I tried use dynamic import + Vue
.
methods: {
submitForm() {
import('../../../api/posts/posts').then((Posts) => {
Posts.insert(this.form, (error) => {
............
});
});
------------
// Get error
[vue-component] Error while compiling in tag <script> col:30 Unexpected token,
expected { (42:30)