This commit is contained in:
@@ -17,12 +17,14 @@ server {
|
|||||||
add_header Content-Type text/plain;
|
add_header Content-Type text/plain;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location /h5/ {
|
||||||
alias /usr/share/nginx/html/;
|
|
||||||
index index.html;
|
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location = / {
|
||||||
|
return 301 /h5/;
|
||||||
|
}
|
||||||
|
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export default defineConfig(({ command, mode }): UserConfig => {
|
|||||||
|
|
||||||
const isBuild = process.env.NODE_ENV === 'production';
|
const isBuild = process.env.NODE_ENV === 'production';
|
||||||
return {
|
return {
|
||||||
|
base: '/h5/',
|
||||||
// 自定义env目录
|
// 自定义env目录
|
||||||
envDir: './env',
|
envDir: './env',
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
Reference in New Issue
Block a user