alantao

1.router文件中使用

export default new Router({
  routes: [{
      path: \'/\',
      name: \'Post\',
      component: () => import (\'@/components/Post\')
    },
    {
      path: \'/After\',
      name: \'After\',
      component: () => import (\'@/components/After\')
    },
    {
      path: \'/Post\',
      name: \'Post\',
      component: () => import (\'@/components/Post\')
    }
  ]
})

 

在webpack.base.conf.js文件中配置chunkFileName  

output: {
    path: config.build.assetsRoot,
    filename: \'[name].js\',
    chunkFilename: \'[name].js\',
    publicPath: process.env.NODE_ENV === \'production\'
      ? config.build.assetsPublicPath
      : config.dev.assetsPublicPath
  },

 

分类:

技术点:

相关文章:

  • 2021-12-28
  • 2022-03-03
  • 2021-12-15
  • 2021-12-18
  • 2022-12-23
  • 2021-06-29
猜你喜欢
  • 2022-12-23
  • 2021-10-19
  • 2021-10-04
  • 2022-02-23
  • 2021-04-18
  • 2021-10-30
相关资源
相似解决方案