Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
Lazy loading doesn't work but eager loading does en Vue Router

I have an Vue CLI 4 project working with lazy loading routes, all of those are working fine except one and I can't figure out why. That's so weird because only one route comes up, I am able to load it via eager loading i.e. something like this:

    import Vue from "vue";
    import Router from "vue-router";
    import Home from "@/views/Home";
    
    import PasswordResetForm from "@/views/PasswordResetForm";
    
    Vue.use(Router);
    
    const routes = [
        {
            path: "/",
            name: "home",
            component: Home
        },
        {
            path: "/iniciar-sesion/restablecer-contrasena",
            name: "password_reset",
            component: PasswordResetForm
        }
    ]

    const router = new Router({
        mode: "history",
        base: process.env.BASE_URL,
        routes
    });
    
    export default router;

If I replace component: PasswordResetForm with conponent: () => import(/* webpackChunkName: "passwordReset" */ "../views/PasswordResetForm") so the component is not rendered neither the <router-view> tag and I don't have any idea what could be wrong.

"webpack": "^3.7.1",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1",
"webpack-merge": "^4.1.0"
"@vue/cli-plugin-pwa": "^4.5.12",
"@vue/cli-plugin-router": "^4.5.12",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-2": "^6.24.1",
"babel-register": "^6.26.0",

I don't have a lot of experience in Vue.js and I don't know if I'm skipping important information by posting this question but if that's the case please let me know.

Be patient with me guys.

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda