The way it was setup in a separate repo was complicated and I assume would discourage contributions (including my own). Now it’s possible to simply make a change to the renderer, and see the result directly, without any complicated build step.
The advantage is that it will also benefit from the existing tooling, including eslint and TypeScript.
The renderer can still be compiled to a self-contained renderer though and thus can be used in projects outside of the main Joplin apps (the goal eventually is to use that renderer in the Joplin Web API for Nextcloud).
/tmp/.mount_JoplindqTVBS/resources/app/index.html
at Module._resolveFilename (internal/modules/cjs/loader.js:717)
at Function../lib/common/reset-search-paths.ts.Module._resolveFilename (reset-search-paths.ts:40)
at Module._load (internal/modules/cjs/loader.js:622)
at Module._load (electron/js2c/asar.js:717)
at Function.Module._load (electron/js2c/asar.js:717)
at Module.require (internal/modules/cjs/loader.js:775)
at require (internal/modules/cjs/helpers.js:68)
at Object. (/tmp/.mount_JoplindqTVBS/resources/app/lib/joplin-renderer/MdToHtml.js:25)
at Object. (/tmp/.mount_JoplindqTVBS/resources/app/lib/joplin-renderer/MdToHtml.js:245)
at Module._compile (internal/modules/cjs/loader.js:880)
Ok it’s good to know it can work like this, but it means we’ll have to duplicate the packages of joplin-renderer package.json in the Electron app package.json, which is a bit messy and difficult to maintain.
Instead of copying the ReactClient/lib folder to each project, wouldn’t it possibly be better to move that folder to the root directory and then have each client just have a require=../lib where needed? Or is there a platform specific reason for the current layout?