avatar

sunday

Sunday's Blog

  • 首页
Home 阿里云oss部署vue3单页应用/静态文件
文章

阿里云oss部署vue3单页应用/静态文件

Posted 2024-05-20 Updated 2024-05- 20
By sunday
6~8 min read

1.将你打包的dist文件上传到你创建的Bucket中,可使用官方工具ossbrowser

可到这个地址下载:https://help.aliyun.com/zh/oss/developer-reference/install-and-log-on-to-ossbrowser?spm=a2c4g.11186623.0.i3#p-ny4-5d3-sty

或者直接在官网点击上传文件即可

2.然后设置静态页面

WeChat5dc0801f73d68b690346b2e24a67e216.jpg

点击数据管理——> 静态页面

WeChat71172a2c18cdf38d50df83552c0c9321.jpg

按照上图填写即可支持 vue-router的 WebHistory模式

如果只要hash模式的话,可以只填默认首页为index.html即可

还有oss给的默认域名,貌似现在只支持下载模式了,要自定义域名才能在浏览器打开显示,不然你用oss的域名在浏览器打开就会下载index.html文件到你电脑了

vue, 软件安装, 软件使用
软件使用 vue3 软件安装
License:  CC BY 4.0
Share

Further Reading

May 23, 2024

vue3除index.html外,所有静态资源部署到阿里云oss上

1.在vite.config.js 中配置 base路径 import { defineConfig, loadEnv } from 'vite' const root = process.cwd() export default defineConfig(({ mode }) => { con

May 20, 2024

阿里云oss部署vue3单页应用/静态文件

1.将你打包的dist文件上传到你创建的Bucket中,可使用官方工具ossbrowser 可到这个地址下载:https://h

Jun 27, 2021

spa单页应用seo优化方案——启动无头浏览器预渲染

spa单页应用seo优化方案——启动无头浏览器预渲染, 使用headerless chromuim开启seo服务 解决单页应用的seo问题,且不用改spa单页应用的代码

OLDER

解决windows11下powershell无法执行pwsh命令

NEWER

自动上传ssl证书到阿里云证书管理控制台中

Recently Updated

  • nextjs使用three.js写一个3D模型的查看器Viewer
  • nextjs15使用better-sqlite3的连接报错问题
  • nextjs + clerk + supabase + realtime 实时监听数据库更改
  • 解决nextjs15使用useLocalStorage报错的问题
  • mac上使用nodejs appium控制chrome浏览器

Trending Tags

nginx acme 强制跳转HTTPS nodejs 代理 mac 神器 vue3 工具 docker

Contents

©2025 sunday. Some rights reserved.

Using the Halo theme Chirpy