fix: paths got broken somehow

This commit is contained in:
cha0s 2022-08-11 06:37:28 -05:00
parent c3910ba5f0
commit c7bbc48d3a
2 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,7 @@
],
"dependencies": {
"@flecks/core": "^1.4.1",
"@neutrinojs/banner": "^9.5.0",
"electron": "^18.0.1",
"electron-devtools-installer": "^3.2.0"
},

View File

@ -2,6 +2,7 @@ import cluster from 'cluster';
import {join} from 'path';
import {require as R} from '@flecks/core/server';
import banner from '@neutrinojs/banner';
import {
app,
BrowserWindow,
@ -21,6 +22,16 @@ async function createWindow(flecks) {
}
export const hooks = {
'@flecks/core.build': (target, config) => {
if ('server' === target) {
config.use.push(banner({
banner: "require('module').Module._initPaths();",
include: 'index.js',
pluginId: 'initPaths',
raw: true,
}));
}
},
'@flecks/core.config': () => ({
/**
* Browser window options.