当前位置:   article > 正文

Vue2.0打包后打开出现空白页解决方法_vue 出现空弹窗

vue 出现空弹窗

Vue2.0打包后打开出现空白页解决方法

hash模式下:

修改\node_modules@vue\cli-service\lib\options.js.js:

\\修改前:
exports.defaults = () => ({
  // project deployment base
  publicPath: '/',

  // where to output built files
  outputDir: 'dist',

  // where to put static assets (js/css/img/font/...)
  assetsDir: '',

  // filename for index.html (relative to outputDir)
  indexPath: 'index.html',

  // whether filename will contain hash part
  filenameHashing: true,

  // boolean, use full build?
  runtimeCompiler: false,
  )}
\\修改后
publicPath: './',
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22

history模式下:

修改配置服务器的代理在找不到对应url时指向index.html即可

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号