Turn off nodeIntegration. Without it disabled, Math.js does not work in production build.

This commit is contained in:
Jonatan Heyman 2023-03-02 20:59:13 +01:00
parent 4d12404d77
commit 82f916122c
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
<div id="app"></div> <div id="app"></div>
<script type="module" src="src/main.js"></script> <script type="module" src="src/main.js"></script>
<script src="math.js" type="text/javascript"></script> <script src="./math.js"></script>
<!--<div id="editor" class="editor"></div> <!--<div id="editor" class="editor"></div>
<script type="module" src="src/editor/index.js"></script>--> <script type="module" src="src/editor/index.js"></script>-->

View File

@ -57,7 +57,7 @@ export default defineConfig({
]), ]),
// Use Node.js API in the Renderer-process // Use Node.js API in the Renderer-process
renderer({ renderer({
nodeIntegration: true, nodeIntegration: false,
}), }),
], ],
server: !!process.env.VSCODE_DEBUG ? (() => { server: !!process.env.VSCODE_DEBUG ? (() => {