Skip to content

Commit 2b7c6f8

Browse files
authored
refactor(flash): remove Ruffle from packing (#470)
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
1 parent ad8f659 commit 2b7c6f8

5 files changed

Lines changed: 2 additions & 27 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
"@github/webauthn-json": "^2.1.1",
6969
"@hope-ui/solid": "0.6.7",
7070
"@monaco-editor/loader": "1.7.0",
71-
"@ruffle-rs/ruffle": "0.2.0-nightly.2026.3.23",
7271
"@solid-primitives/i18n": "^2.2.1",
7372
"@solid-primitives/keyboard": "^1.3.5",
7473
"@solid-primitives/storage": "^1.3.11",

pnpm-lock.yaml

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hooks/useCDN.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ export const useCDN = () => {
3131
: `${static_path}/mermaid/mermaid.min.js`
3232
}
3333

34-
const ruffleJSPath = () => {
35-
return import.meta.env.VITE_LITE === "true"
36-
? npm(
37-
packageJson.name,
38-
packageJson.version,
39-
"dist/static/ruffle/ruffle.js",
40-
)
41-
: `${static_path}/ruffle/ruffle.js`
42-
}
43-
4434
const libHeifPath = () => {
4535
return import.meta.env.VITE_LITE === "true"
4636
? npm(packageJson.name, packageJson.version, "dist/static/libheif")
@@ -64,7 +54,6 @@ export const useCDN = () => {
6454
monacoPath,
6555
katexCSSPath,
6656
mermaidJSPath,
67-
ruffleJSPath,
6857
libHeifPath,
6958
libAssPath,
7059
fontsPath,

src/pages/home/previews/flash.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Error, FullLoading } from "~/components"
2-
import { useCDN, useRouter, useT } from "~/hooks"
2+
import { useRouter, useT } from "~/hooks"
33
import { objStore } from "~/store"
44
import { onCleanup, onMount, createSignal, Show } from "solid-js"
55

@@ -8,7 +8,6 @@ const Preview = () => {
88
const { replace } = useRouter()
99
const [loading, setLoading] = createSignal(true)
1010
const [error, setError] = createSignal(false)
11-
const { ruffleJSPath } = useCDN()
1211

1312
// 获取当前目录下所有SWF文件
1413
let swfFiles = objStore.objs.filter((obj) =>
@@ -59,7 +58,7 @@ const Preview = () => {
5958
// 动态加载Ruffle脚本
6059
const script = document.createElement("script")
6160
// script.src = "https://unpkg.com/@ruffle-rs/ruffle"
62-
script.src = ruffleJSPath()
61+
script.src = "https://res.oplist.org.cn/ruffle/ruffle.js"
6362
script.async = true
6463
script.id = "ruffle-script"
6564

vite.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ export default defineConfig({
7373
src: "node_modules/mermaid/dist/mermaid.min.js",
7474
dest: "static/mermaid",
7575
},
76-
{
77-
src: "node_modules/@ruffle-rs/ruffle/*.{js,wasm}",
78-
dest: "static/ruffle",
79-
},
8076
{
8177
src: "node_modules/libheif-js/libheif-wasm/libheif.{js,wasm}",
8278
dest: "static/libheif",

0 commit comments

Comments
 (0)