dev: Build playground files much faster and add watch
This commit is contained in:
parent
2c2e421382
commit
df692427ca
15 changed files with 460 additions and 278 deletions
|
@ -1,3 +1,3 @@
|
|||
import {createBundles} from './buildUtils'
|
||||
import {createBundles} from './createBundles'
|
||||
|
||||
createBundles(false)
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
import path from 'path'
|
||||
import {build} from 'esbuild'
|
||||
|
||||
export const definedGlobals = {
|
||||
'process.env.THEATRE_VERSION': JSON.stringify(
|
||||
require('../studio/package.json').version,
|
||||
),
|
||||
// json-touch-patch (an unmaintained package) reads this value. We patch it to just 'Set', becauce
|
||||
// this is only used in `@theatre/studio`, which only supports evergreen browsers
|
||||
'global.Set': 'Set',
|
||||
}
|
||||
import {definedGlobals} from './definedGlobals'
|
||||
|
||||
export function createBundles(watch: boolean) {
|
||||
for (const which of ['core', 'studio']) {
|
8
theatre/devEnv/definedGlobals.ts
Normal file
8
theatre/devEnv/definedGlobals.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
export const definedGlobals = {
|
||||
'process.env.THEATRE_VERSION': JSON.stringify(
|
||||
require('../studio/package.json').version,
|
||||
),
|
||||
// json-touch-patch (an unmaintained package) reads this value. We patch it to just 'Set', becauce
|
||||
// this is only used in `@theatre/studio`, which only supports evergreen browsers
|
||||
'global.Set': 'Set',
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
import {createBundles} from './buildUtils'
|
||||
import {createBundles} from './createBundles'
|
||||
|
||||
createBundles(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue