mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 07:20:02 -04:00
initial commit
This commit is contained in:
commit
d7b4a8bd31
22 changed files with 3411 additions and 0 deletions
38
esbuild.dev.js
Normal file
38
esbuild.dev.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
import { createServer } from "esbuild-server";
|
||||
import copy from "esbuild-plugin-copy";
|
||||
import time from "esbuild-plugin-time";
|
||||
|
||||
const devServer = createServer({
|
||||
entryPoints: {
|
||||
client: "./src/client/index.ts",
|
||||
bundle: "./src/bundle/index.ts",
|
||||
worker: "./src/worker/index.ts",
|
||||
codecs: "./src/codecs/index.ts",
|
||||
config: "./src/scramjet.config.ts",
|
||||
},
|
||||
entryNames: "scramjet.[name]",
|
||||
outdir: "./dist",
|
||||
bundle: true,
|
||||
sourcemap: true,
|
||||
plugins: [
|
||||
copy({
|
||||
resolveFrom: "cwd",
|
||||
assets: {
|
||||
from: ["./dist/*"],
|
||||
to: ["./static"]
|
||||
}
|
||||
}),
|
||||
time()
|
||||
]
|
||||
}, {
|
||||
static: "./static",
|
||||
port: 1337,
|
||||
proxy: (path) => {
|
||||
if (path.startsWith("/bare")) {
|
||||
return path.replace("/bare", "http://127.0.0.1:3000")
|
||||
}
|
||||
},
|
||||
injectLiveReload: false
|
||||
});
|
||||
|
||||
devServer.start();
|
Loading…
Add table
Add a link
Reference in a new issue