fix webpack build

This commit is contained in:
zadam 2021-12-24 22:18:05 +01:00
parent a232035d47
commit 3f307b117e
7 changed files with 10 additions and 3 deletions

View File

@ -59,6 +59,7 @@ async function createMainWindow() {
height: mainWindowState.height, height: mainWindowState.height,
title: 'Trilium Notes', title: 'Trilium Notes',
webPreferences: { webPreferences: {
enableRemoteModule: true,
nodeIntegration: true, nodeIntegration: true,
contextIsolation: false, contextIsolation: false,
spellcheck: spellcheckEnabled spellcheck: spellcheckEnabled

View File

@ -41,6 +41,8 @@
<%- include('dialogs/delete_notes.ejs') %> <%- include('dialogs/delete_notes.ejs') %>
<script type="text/javascript"> <script type="text/javascript">
global = globalThis; /* fixes https://github.com/webpack/webpack/issues/10035 */
window.baseApiUrl = 'api/'; window.baseApiUrl = 'api/';
window.device = "desktop"; window.device = "desktop";
window.glob = { window.glob = {

View File

@ -105,6 +105,8 @@
<%- include('dialogs/confirm.ejs') %> <%- include('dialogs/confirm.ejs') %>
<script type="text/javascript"> <script type="text/javascript">
global = globalThis; /* fixes https://github.com/webpack/webpack/issues/10035 */
window.baseApiUrl = 'api/'; window.baseApiUrl = 'api/';
window.device = "mobile"; window.device = "mobile";
window.glob = { window.glob = {

View File

@ -189,6 +189,8 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
global = globalThis; /* fixes https://github.com/webpack/webpack/issues/10035 */
window.glob = { window.glob = {
sourceId: '' sourceId: ''
}; };

View File

@ -11,5 +11,5 @@ module.exports = {
filename: 'desktop.js' filename: 'desktop.js'
}, },
devtool: 'source-map', devtool: 'source-map',
target: 'electron-main' target: 'electron-renderer'
}; };

View File

@ -11,5 +11,5 @@ module.exports = {
filename: 'mobile.js' filename: 'mobile.js'
}, },
devtool: 'source-map', devtool: 'source-map',
target: 'electron-main' target: 'electron-renderer'
}; };

View File

@ -11,5 +11,5 @@ module.exports = {
filename: 'setup.js' filename: 'setup.js'
}, },
devtool: 'source-map', devtool: 'source-map',
target: 'electron-main' target: 'electron-renderer'
}; };