work on serialport and events

This commit is contained in:
Richard Unger
2024-02-26 23:39:04 +01:00
parent 58d552c49f
commit e92e697cfa
5 changed files with 84 additions and 71 deletions

View File

@@ -1,8 +1,10 @@
import { defineConfig } from 'vite'
import eslint from 'vite-plugin-eslint'
import { builtinModules } from "module";
// https://vitejs.dev/config
export default defineConfig({
mode: 'development',
resolve: {
// Some libs that can run in both Web and Node.js, such as `axios`, we need to tell Vite to build them in Node.js.
browserField: false,
@@ -15,4 +17,10 @@ export default defineConfig({
failOnError: false,
}),
],
build: {
minify: false, //process.env.MODE !== "development",
rollupOptions: {
external: ["electron", "serialport", ...builtinModules]
}
},
})