add node env to packages in build script
This commit is contained in:
parent
014bfbc841
commit
89c1c4a4f4
5 changed files with 30 additions and 0 deletions
|
@ -29,6 +29,9 @@ async function main() {
|
|||
external: Object.keys(pkg.dependencies ?? {}).concat(Object.keys(pkg.peerDependencies ?? {})),
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmResult = esbuild.buildSync({
|
||||
|
@ -44,6 +47,9 @@ async function main() {
|
|||
external: Object.keys(pkg.dependencies).concat(Object.keys(pkg.peerDependencies)),
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmSize = Object.values(esmResult.metafile.outputs).reduce(
|
||||
|
|
|
@ -26,6 +26,9 @@ async function main() {
|
|||
tsconfig: './tsconfig.build.json',
|
||||
metafile: false,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmResult = esbuild.buildSync({
|
||||
|
@ -38,6 +41,9 @@ async function main() {
|
|||
tsconfig: './tsconfig.build.json',
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmSize = Object.values(esmResult.metafile.outputs).reduce(
|
||||
|
|
|
@ -27,6 +27,9 @@ async function main() {
|
|||
external: Object.keys(pkg.dependencies),
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmResult = esbuild.buildSync({
|
||||
|
@ -40,6 +43,9 @@ async function main() {
|
|||
external: Object.keys(pkg.dependencies),
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmSize = Object.values(esmResult.metafile.outputs).reduce(
|
||||
|
|
|
@ -29,6 +29,9 @@ async function main() {
|
|||
external: Object.keys(pkg.dependencies).concat(Object.keys(pkg.peerDependencies)),
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmResult = esbuild.buildSync({
|
||||
|
@ -44,6 +47,9 @@ async function main() {
|
|||
external: Object.keys(pkg.dependencies).concat(Object.keys(pkg.peerDependencies)),
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmSize = Object.values(esmResult.metafile.outputs).reduce(
|
||||
|
|
|
@ -26,6 +26,9 @@ async function main() {
|
|||
tsconfig: './tsconfig.build.json',
|
||||
metafile: false,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmResult = esbuild.buildSync({
|
||||
|
@ -38,6 +41,9 @@ async function main() {
|
|||
tsconfig: './tsconfig.build.json',
|
||||
metafile: true,
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.NODE_ENV': '"production"',
|
||||
},
|
||||
})
|
||||
|
||||
const esmSize = Object.values(esmResult.metafile.outputs).reduce(
|
||||
|
|
Loading…
Reference in a new issue