For example: tiddlywiki
npm i tiddlywiki
- Add
ExternalsPlugin
in webpack.plugins.js (maybe optional for some deps, tiddlywiki needs this because its customrequire
can't require things that is bundled by webpack.dugite
don't need this step) - Add a
await fs.copy(path.join(projectRoot, 'node_modules/@tiddlygit/tiddlywiki')
inscripts/afterPack.js
, to copy things to resource folder, that is outside of asar, so it can be used by the worker_thread in electron