Fix process.env.version in browser-bundles (#206)

* Fix `process.env.version` in browser-bundles

- also fix tsdoc warns in mjs files

Co-authored-by: Fülöp Kovács <kovacs.fulop@gmail.com>
Co-authored-by: Cole Lawrence <cole@colelawrence.com>

* Change to `process.env.THEATRE_VERSION`

Co-authored-by: Fülöp Kovács <kovacs.fulop@gmail.com>
Co-authored-by: Cole Lawrence <cole@colelawrence.com>
This commit is contained in:
Elliot 2022-06-09 13:05:25 -04:00 committed by GitHub
parent d7fc381137
commit bebf281517
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 39 additions and 24 deletions

View file

@ -4,6 +4,9 @@ import type {Plugin} from 'esbuild'
const definedGlobals = {
global: 'window',
'process.env.THEATRE_VERSION': JSON.stringify(
require('../package.json').version,
),
}
function createBundles(watch: boolean) {

View file

@ -2,7 +2,9 @@ import path = require('path')
import {build} from 'esbuild'
const definedGlobals = {
'process.env.version': JSON.stringify(require('../package.json').version),
'process.env.THEATRE_VERSION': JSON.stringify(
require('../package.json').version,
),
'process.env.NODE_ENV': JSON.stringify('production'),
}