Skip to content

Commit

Permalink
refactor(index.html): update DNS prefetch domains to *.gopluscdn.com (
Browse files Browse the repository at this point in the history
#928)

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
  • Loading branch information
aofei authored Sep 24, 2024
1 parent 2a393f1 commit dbdd6c7
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 13 deletions.
16 changes: 12 additions & 4 deletions spx-gui/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="dns-prefetch" href="https://builder-static.goplus.org" />
<link rel="dns-prefetch" href="https://aigc-static.goplus.org" />
<link rel="dns-prefetch" href="https://upload-na0.qiniup.com" />
<link rel="preconnect" href="https://builder-static.goplus.org" crossorigin />
<% if (NODE_ENV === 'production') { %>
<link rel="dns-prefetch" href="https://builder-static.gopluscdn.com" />
<link rel="dns-prefetch" href="https://builder-usercontent.gopluscdn.com" />
<link rel="preconnect" href="https://builder-static.gopluscdn.com" crossorigin />
<link rel="preconnect" href="https://builder-usercontent.gopluscdn.com" crossorigin />
<% } else { %>
<link rel="dns-prefetch" href="https://builder-static-test.gopluscdn.com" />
<link rel="dns-prefetch" href="https://builder-usercontent-test.gopluscdn.com" />
<link rel="preconnect" href="https://builder-static-test.gopluscdn.com" crossorigin />
<link rel="preconnect" href="https://builder-usercontent-test.gopluscdn.com" crossorigin />
<% } %>

<title>Go+ Builder</title>
<meta name="description" content="Go+ Builder is a tool for building games. We create it to help children to learn abilities to build." />
Expand Down
222 changes: 214 additions & 8 deletions spx-gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions spx-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"ts-node": "^10.9.1",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-ejs": "^1.7.0",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-vercel": "^9.0.1",
"vite-plugin-vue-devtools": "^7.0.7",
Expand Down
3 changes: 2 additions & 1 deletion spx-gui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import VueDevTools from 'vite-plugin-vue-devtools'
import { ViteEjsPlugin } from 'vite-plugin-ejs'
import vercel from 'vite-plugin-vercel'
import path from 'path'
// https://vitejs.dev/config/
const resolve = (dir: string) => path.join(__dirname, dir)
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
plugins: [vue(), VueDevTools(), vercel()],
plugins: [vue(), VueDevTools(), ViteEjsPlugin(), vercel()],
resolve: {
alias: {
'@': resolve('src')
Expand Down

0 comments on commit dbdd6c7

Please sign in to comment.