You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look at the images plugin fetched via npm, it's missing files in the build/workers directory.
❯ ls @elderjs/plugin-images/build
index.js index.mjs
But if you look at the markdown plugin, its utils directory is there.
❯ ls @elderjs/plugin-markdown/build
index.cjs index.d.ts index.js utils
Of note: the images plugin is not "type": "module". If you convert it to that, you'll have to fix the use of __dirname to use ESM-friendly stuff. Not sure if just doing that is enough to fix the build issue, or if something else is going on.
The text was updated successfully, but these errors were encountered:
@markjaquith This is an issue with tsup's default configured bundling. Because it only bundles obvious imports the way the workers are imported the files weren't detected.
I shipped a potential fix in 1.8.0-beta.8 that should work with cjs assuming the bundling works. Will be testing it on our cjs projects.
@nickreese The files are there now, but now I'm getting this:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/mark/Sites/markjaquith.com/node_modules/@elderjs/plugin-images/build/workers/resize.js from /Users/mark/Sites/markjaquith.com/node_modules/worker-nodes/lib/worker/child-loader.js not supported.
Instead change the require of resize.js in /Users/mark/Sites/markjaquith.com/node_modules/worker-nodes/lib/worker/child-loader.js to a dynamic import() which is available in all CommonJS modules.
at setupModule (/Users/mark/Sites/markjaquith.com/node_modules/worker-nodes/lib/worker/child-loader.js:11:15)
at MessagePort.<anonymous> (/Users/mark/Sites/markjaquith.com/node_modules/worker-nodes/lib/worker/child-loader.js:88:20) {
code: 'ERR_REQUIRE_ESM'
}
If you look at the images plugin fetched via npm, it's missing files in the
build/workers
directory.But if you look at the markdown plugin, its
utils
directory is there.Of note: the images plugin is not
"type": "module"
. If you convert it to that, you'll have to fix the use of__dirname
to use ESM-friendly stuff. Not sure if just doing that is enough to fix the build issue, or if something else is going on.The text was updated successfully, but these errors were encountered: