Sign in
Log inSign up

Vue code splitting in Laravel

Emil Moe's photo
Emil Moe
·Mar 29, 2018

I'm struggling to figure out how this code splitting works. As of now the JS file has become way too big and code splitting is a must. I saw Evan You writing this in a presentation:

const Component = () => import('./Component.vut')

But Webpack won't let me compile that.

I'm importing my components as

Vue.component('Component', require('./Component.vue'))

Hope some of you can help me out here :-)

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct