fix: comic book reader in prod
This commit is contained in:
parent
e37595ab29
commit
df58aedfdf
1 changed files with 7 additions and 1 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue