aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/esbuild.config.js
blob: 76530782ef0b42b6c12fcfbe45b09c9bc7716a11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// @ts-check

const { node } = require('../../config/build-common');
const { getConfig } = require('../../config/esbuild-config');

const externalPackages = ['electron'];

if (process.env.MODE !== 'development') {
  externalPackages.push('electron-devtools-installer');
}

module.exports = getConfig({
  absWorkingDir: __dirname,
  entryPoints: [
    'src/index.ts',
  ],
  outfile: 'dist/index.cjs',
  format: 'cjs',
  platform: 'node',
  target: node,
  external: externalPackages,
}, {
  VITE_DEV_SERVER_URL: process.env.VITE_DEV_SERVER_URL || null,
});