From 61fd13c55f5e69a9d8b32dd0d74b08870783bcce Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Thu, 30 Dec 2021 00:26:01 +0100 Subject: build: Switch to esbuild We will build all packages except the frontend (where vite remains in use) with esbuild. For some reason, the @yarnpkg/esbuild-plugin-pnp doesn't allow esbuild to load esm modules and we fall back to commonjs for dependencies. Hence we had to switch back to node_modules (but still rely on yarn hardlinking for a more efficient install). --- packages/service-preload/esbuild.config.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/service-preload/esbuild.config.js (limited to 'packages/service-preload/esbuild.config.js') diff --git a/packages/service-preload/esbuild.config.js b/packages/service-preload/esbuild.config.js new file mode 100644 index 0000000..76ac33f --- /dev/null +++ b/packages/service-preload/esbuild.config.js @@ -0,0 +1,19 @@ +// @ts-check + +const { chrome } = require('../../config/build-common'); +const { getConfig } = require('../../config/esbuild-config'); + +module.exports = getConfig({ + absWorkingDir: __dirname, + entryPoints: [ + 'src/index.ts', + ], + outfile: 'dist/index.cjs', + format: 'cjs', + platform: 'node', + target: chrome, + sourcemap: 'inline', + external: [ + 'electron', + ], +}); -- cgit v1.2.3-54-g00ecf