Closed ItalyPaleAle closed 1 year ago
Looks like loading the script using the modules
array seems to make it work:
new Miniflare({
host: options.address,
port: parseInt(options.port, 10),
workers: [
{
name: 'myapp',
modules: [{
type: 'ESModule',
contents: script.toString('utf8'),
path: 'index.mjs',
}],
compatibilityDate: '2023-05-18',
sitePath: options.sitePath,
},
],
})
Hey! 👋 This was raised by an internal user a couple weeks ago and it looks like a PR (#622) was put up to fix it, but closed. We should get that merged. 👍
Fixed by #631
Trying to start Miniflare serving a site too, with this code:
However, this fails with:
If I modify
getServices
to add aconsole.log
, I can see thatadditionalModules
is populated correctly:However, it appears that the next line, invoking
getWorkerScript
, doesn't get this manifest and panics.