mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
bare-mux support
This commit is contained in:
parent
8b2757b495
commit
5a8aa6698e
7 changed files with 36 additions and 16 deletions
|
@ -17,10 +17,20 @@ const devServer = createServer({
|
|||
plugins: [
|
||||
copy({
|
||||
resolveFrom: "cwd",
|
||||
assets: {
|
||||
from: ["./dist/*"],
|
||||
to: ["./static"]
|
||||
}
|
||||
assets: [
|
||||
{
|
||||
from: ['./node_modules/@mercuryworkshop/bare-mux/dist/bare.cjs'],
|
||||
to: ['./static/bare-mux.js'],
|
||||
},
|
||||
{
|
||||
from: ['./node_modules/@mercuryworkshop/bare-as-module3/dist/bare.cjs'],
|
||||
to: ['./static/bare-client.js'],
|
||||
},
|
||||
{
|
||||
from: ["./dist/*"],
|
||||
to: ["./static"]
|
||||
},
|
||||
],
|
||||
}),
|
||||
time()
|
||||
]
|
||||
|
@ -28,8 +38,8 @@ const devServer = createServer({
|
|||
static: "./static",
|
||||
port: 1337,
|
||||
proxy: (path) => {
|
||||
if (path.startsWith("/bare")) {
|
||||
return path.replace("/bare", "http://127.0.0.1:3000")
|
||||
if (path.startsWith("/bare/")) {
|
||||
return path.replace("/bare/", "http://127.0.0.1:3000/")
|
||||
}
|
||||
},
|
||||
injectLiveReload: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue