feat: 修改tradingview的websocket请求方式
This commit is contained in:
@@ -12,6 +12,7 @@ import icons from "unplugin-icons/vite";
|
||||
import { IonicResolver } from "unplugin-vue-components/resolvers";
|
||||
import components from "unplugin-vue-components/vite";
|
||||
import { defineConfig } from "vite";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
import { generateVersion } from "./scripts/build";
|
||||
|
||||
dotenv.config({ path: `.env.${process.env.NODE_ENV}` });
|
||||
@@ -39,6 +40,46 @@ export default defineConfig({
|
||||
directoryAsNamespace: true,
|
||||
resolvers: [IonicResolver(), iconsResolver({ prefix: "i" })],
|
||||
}),
|
||||
VitePWA({
|
||||
registerType: "autoUpdate",
|
||||
includeAssets: ["favicon.svg", "apple-touch-icon.png"],
|
||||
manifest: {
|
||||
name: "Riwa",
|
||||
short_name: "Riwa",
|
||||
description: "Riwa Ionic App",
|
||||
theme_color: "#ffffff",
|
||||
background_color: "#ffffff",
|
||||
display: "standalone",
|
||||
orientation: "portrait",
|
||||
scope: "/",
|
||||
start_url: "/",
|
||||
id: "/",
|
||||
prefer_related_applications: false,
|
||||
icons: [
|
||||
{
|
||||
src: "/pwa-192x192.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "/pwa-512x512.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "/pwa-512x512.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
purpose: "any maskable",
|
||||
},
|
||||
],
|
||||
},
|
||||
workbox: {
|
||||
globPatterns: ["**/*.{js,css,html,ico,png,svg,woff2}"],
|
||||
navigateFallback: "/index.html",
|
||||
navigateFallbackDenylist: [/^\/api/],
|
||||
},
|
||||
}),
|
||||
generateVersion({
|
||||
version: appVersion,
|
||||
}),
|
||||
@@ -57,6 +98,7 @@ export default defineConfig({
|
||||
"/api": {
|
||||
target: process.env.VITE_API_URL,
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user