miniflare
miniflare copied to clipboard
Workers using local modules cannot be mounted
When using this in my wrangler.toml
:
[[build.upload.rules]]
type = "Data"
globs = ["**/*.html"]
And this in my worker.mjs
:
import HTML from "chat.html";
miniflare
runs fine. But when I try to mount this worker from another worker like this:
[miniflare.mounts]
worker = "../worker"
I get an error like this:
Cause: RangeError: path should be a `path.relative()`d string, but got "../worker/dist/chat.html
Hey! 👋 Thanks for raising this. I've seen this error before and it always confuses me: ../worker/dist/chat.html
is definitely a path.relative()
d string 😅. I'm pretty busy the next few weeks with exams, but will look into this (potentially using a different glob-matching package) soon. 👍