Git Product home page Git Product logo

Comments (3)

CareyWang avatar CareyWang commented on July 2, 2024

由于项目架构特性,配置到二级目录需要修改较多配置参数,如 webpack 打包输出路径,路由的根路径,各种资源引用修改为相对路径,nginx 配置 try_files。有兴趣可以自行研究,Google 搜索关键词『Vue项目编译后部署在非网站根目录』。

from sub-web.

jerrell851 avatar jerrell851 commented on July 2, 2024

由于项目架构特性,配置到二级目录需要修改较多配置参数,如 webpack 打包输出路径,路由的根路径,各种资源引用修改为相对路径,nginx 配置 try_files。有兴趣可以自行研究,Google 搜索关键词『Vue项目编译后部署在非网站根目录』。

看了相关的资料,也知道的修改的方法。但我没找到网上修改例子中提到的config/index.js文件,请问您这个项目的这个文件是存放在哪个路径下面的?或者您是否可以指出大概需要修改您项目的哪些文件,给个文件列表给我,我慢慢琢磨。

from sub-web.

CareyWang avatar CareyWang commented on July 2, 2024

项目基于 vue-cli 开发,webpack 相关配置位于根目录下 vue.config.js,类似:

module.exports = {
  publicPath: '/web/'
}

vue-router 相关配置位于 src/router/index.js。

更多配置细节可以参考 vue-cli 文档

from sub-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.