(WIP) Switch the rest of the build setup to esbuild - 1
This commit is contained in:
parent
b13f1131c5
commit
7c2e12c233
7 changed files with 20 additions and 26 deletions
|
@ -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)
|
||||
}
|
||||
|
|
6
theatre/devEnv/buildUtils.ts
Normal file
6
theatre/devEnv/buildUtils.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
export const definedGlobals = {
|
||||
global: 'window',
|
||||
'process.env.version': JSON.stringify(
|
||||
require('../studio/package.json').version,
|
||||
),
|
||||
}
|
4
theatre/globals.d.ts
vendored
4
theatre/globals.d.ts
vendored
|
@ -13,10 +13,6 @@ interface ProcessEnv {
|
|||
version: string
|
||||
}
|
||||
|
||||
declare var process: {
|
||||
env: ProcessEnv
|
||||
}
|
||||
|
||||
declare module '*.svg' {
|
||||
var s: string
|
||||
export default s
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"@types/jest": "^26.0.23",
|
||||
"@types/lodash": "^4.14.170",
|
||||
"@types/lodash-es": "^4.17.4",
|
||||
"@types/node": "^15.6.2",
|
||||
"@types/node": "^15.12.3",
|
||||
"@types/react": "^17.0.9",
|
||||
"@types/react-dom": "^17.0.6",
|
||||
"@types/react-icons": "^3.0.0",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"lib": ["es2017", "dom", "ESNext"],
|
||||
"rootDir": ".",
|
||||
"composite": true,
|
||||
"types": ["jest"],
|
||||
"types": ["jest", "node"],
|
||||
"plugins": [
|
||||
{
|
||||
"name": "typescript-styled-plugin",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue