Skip to content

Commit 0be4755

Browse files
committed
Merge main
1 parent af2f3fc commit 0be4755

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "%extension.displayName%",
44
"description": "%extension.description%",
55
"publisher": "RooVeterinaryInc",
6-
"version": "3.17.2",
6+
"version": "3.18.0",
77
"icon": "assets/icons/icon.png",
88
"galleryBanner": {
99
"color": "#617A91",

webview-ui/vite.config.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,37 @@ import tailwindcss from "@tailwindcss/vite"
77

88
import { getGitSha } from "@roo-code/build"
99

10+
const wasmPlugin = (): Plugin => ({
11+
name: "wasm",
12+
async load(id) {
13+
if (id.endsWith(".wasm")) {
14+
const wasmBinary = await import(id)
15+
16+
return `
17+
const wasmModule = new WebAssembly.Module(${wasmBinary.default});
18+
export default wasmModule;
19+
`
20+
}
21+
},
22+
})
23+
24+
const persistPortPlugin = (): Plugin => ({
25+
name: "write-port-to-file",
26+
configureServer(viteDevServer) {
27+
viteDevServer?.httpServer?.once("listening", () => {
28+
const address = viteDevServer?.httpServer?.address()
29+
const port = address && typeof address === "object" ? address.port : null
30+
31+
if (port) {
32+
fs.writeFileSync(resolve(__dirname, "..", ".vite-port"), port.toString())
33+
console.log(`[Vite Plugin] Server started on port ${port}`)
34+
} else {
35+
console.warn("[Vite Plugin] Could not determine server port")
36+
}
37+
})
38+
},
39+
})
40+
1041
// https://vitejs.dev/config/
1142
export default defineConfig(({ mode }) => {
1243
let outDir = "../src/webview-ui/build"
@@ -79,34 +110,3 @@ export default defineConfig(({ mode }) => {
79110
assetsInclude: ["**/*.wasm", "**/*.wav"],
80111
}
81112
})
82-
83-
const wasmPlugin = (): Plugin => ({
84-
name: "wasm",
85-
async load(id) {
86-
if (id.endsWith(".wasm")) {
87-
const wasmBinary = await import(id)
88-
89-
return `
90-
const wasmModule = new WebAssembly.Module(${wasmBinary.default});
91-
export default wasmModule;
92-
`
93-
}
94-
},
95-
})
96-
97-
const persistPortPlugin = (): Plugin => ({
98-
name: "write-port-to-file",
99-
configureServer(viteDevServer) {
100-
viteDevServer?.httpServer?.once("listening", () => {
101-
const address = viteDevServer?.httpServer?.address()
102-
const port = address && typeof address === "object" ? address.port : null
103-
104-
if (port) {
105-
fs.writeFileSync(resolve(__dirname, "..", ".vite-port"), port.toString())
106-
console.log(`[Vite Plugin] Server started on port ${port}`)
107-
} else {
108-
console.warn("[Vite Plugin] Could not determine server port")
109-
}
110-
})
111-
},
112-
})

0 commit comments

Comments
 (0)