fix: comic book reader in prod

This commit is contained in:
Sean Yesmunt 2019-06-04 14:32:42 -04:00
parent e37595ab29
commit df58aedfdf

View file

@ -10,8 +10,14 @@ type Props = {
},
};
let workerPath = 'webworkers/worker-bundle.js';
if (process.env.NODE_ENV !== 'production') {
// Don't add a leading slash in production because electron treats it as an absolute path
workerPath = `/${workerPath}`;
}
const opts = {
workerPath: '/webworkers/worker-bundle.js',
workerPath,
allowFullScreen: false,
autoHideControls: true,
};