zoukankan      html  css  js  c++  java
  • 学习笔记-vue 打包去#和页面空白问题

    文件资源路径是对的,但是页面空白。百度了很久找了一篇文章解决了。

    1.vue项目中config文件下index.js中打包配置

    build: {
    // Template for index.html
    index: path.resolve(__dirname, '../dist/index.html'),

    // Paths
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '/dist/',//history

    2.路由配置:router文件夹下index.js
    let router = new Router({
    mode: 'history',//history
    base: '/dist/',//history,
     router:[{...}]
    })

    原文: https://blog.csdn.net/mjlfto/article/details/80270620
  • 相关阅读:
    虚拟机网络配置常见问题总结
    Python
    Python
    Python
    Python
    Python
    Python
    MySQL
    MySQL
    MySQL
  • 原文地址:https://www.cnblogs.com/opcec/p/9435191.html
Copyright © 2011-2022 走看看