Skip to content

Commit

Permalink
feat: update esbuild config to support building multiple files for ma…
Browse files Browse the repository at this point in the history
…in (#41)

* feat: add support for preload script build from main

Co-authored-by: Bart Verkoeijen <[email protected]>
  • Loading branch information
wisedier and bgever authored Mar 24, 2021
1 parent c77c6dc commit 8b60c0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/electron-snowpack/lib/get-esbuild-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ module.exports = async (more) => {
return {
platform: 'node',
format: 'cjs',
entryPoints: await promisify(glob)('src/main/index.[jt]s'),
outfile: path.join(config.outputDir, 'main/index.js'),
entryPoints: await promisify(glob)('src/main/@(index|preload).[jt]s'),
outdir: path.join(config.outputDir, 'main'),
bundle: true,
external: ['electron'],
define,
Expand Down

0 comments on commit 8b60c0c

Please sign in to comment.