fix: move wiki-worker back after disable asar

This commit is contained in:
tiddlygit-test 2020-11-01 15:10:18 +08:00
parent dcc3cc9c45
commit f0fbcbeb23
2 changed files with 7 additions and 7 deletions

View file

@ -154,10 +154,10 @@ const options = {
// ...excludedFiles.map(pathName => `!${pathName.replace('**/', '')}`),
],
extraResources: [
{
from: 'public/libs/wiki/wiki-worker.js',
to: 'app.asar.unpacked/wiki-worker.js',
},
// {
// from: 'public/libs/wiki/wiki-worker.js',
// to: 'app.asar.unpacked/wiki-worker.js',
// },
// ...excludedFiles.map(pathName => ({
// from: pathName.replace('**/', '').replace('/**/*', ''),
// to: `app.asar.unpacked/${pathName.replace('**/', '').replace('/**/*', '')}`,

View file

@ -29,9 +29,9 @@ const wikiWorkers = {};
// don't forget to config option in `dist.js` https://github.com/electron/electron/issues/18540#issuecomment-652430001
// to copy all worker.js and its local dependence to `process.resourcesPath`
const WIKI_WORKER_PATH = isDev
? path.resolve(__dirname, './wiki-worker.js')
: path.resolve(process.resourcesPath, 'app.asar.unpacked', 'wiki-worker.js');
const WIKI_WORKER_PATH = /* isDev
? */ path.resolve(__dirname, './wiki-worker.js');
// : path.resolve(process.resourcesPath, 'app.asar.unpacked', 'wiki-worker.js');
module.exports.startWiki = function startWiki(homePath, tiddlyWikiPort, userName) {
return new Promise((resolve, reject) => {