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": { "dependencies": {
"@flecks/core": "^1.4.1", "@flecks/core": "^1.4.1",
"@neutrinojs/banner": "^9.5.0",
"electron": "^18.0.1", "electron": "^18.0.1",
"electron-devtools-installer": "^3.2.0" "electron-devtools-installer": "^3.2.0"
}, },

View File

@ -2,6 +2,7 @@ import cluster from 'cluster';
import {join} from 'path'; import {join} from 'path';
import {require as R} from '@flecks/core/server'; import {require as R} from '@flecks/core/server';
import banner from '@neutrinojs/banner';
import { import {
app, app,
BrowserWindow, BrowserWindow,
@ -21,6 +22,16 @@ async function createWindow(flecks) {
} }
export const hooks = { 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': () => ({ '@flecks/core.config': () => ({
/** /**
* Browser window options. * Browser window options.