Hello guys, im facing a few problems after i built the project.
the cannot find module newMessageHandler, axios, crypto
i tried using path.join(__dirname, 'events/newMessage.js'); but then i get error newMessage/axios/crypto is not a function
full code: https://github.com/DaYroXy/cryptwohale-desktop
of course i did install the dependencies 'npm i axios crypto etc...'
Main:
const { app, BrowserWindow, ipcMain } = require('electron');
const path = require('path');
const newMessageHandler = require('./events/newMessage.js');
const axios = require('axios')
const crypto = require('crypto')
const isDev = !app.isPackaged;
viteConfig:
export default defineConfig({
plugins: [react()],
build: {
outDir: 'dist',
},
base: './', // Set base to './'
});
Not really sure how to include events/* folder as well as the axios/crypto dependencies