(WIP) Switch the rest of the build setup to esbuild - 1

This commit is contained in:
Aria Minaei 2021-06-18 21:03:44 +02:00
parent b13f1131c5
commit 7c2e12c233
7 changed files with 20 additions and 26 deletions

View file

@ -1,4 +1,5 @@
import path from 'path'
import {definedGlobals} from './buildUtils'
for (const which of ['core', 'studio']) {
const pathToPackage = path.join(__dirname, '../', which)
@ -9,12 +10,7 @@ for (const which of ['core', 'studio']) {
outfile: path.join(pathToPackage, 'dist/index.js'),
bundle: true,
sourcemap: true,
define: {
global: 'window',
'process.env.version': JSON.stringify(
require('../studio/package.json').version,
),
},
define: definedGlobals,
}
require('esbuild').build(esbuildConfig)
}

View file

@ -0,0 +1,6 @@
export const definedGlobals = {
global: 'window',
'process.env.version': JSON.stringify(
require('../studio/package.json').version,
),
}