@chialab/esbuild-rna
Advanced tools
Comparing version 0.17.0 to 0.17.1
@@ -250,2 +250,3 @@ import path from 'path'; | ||
constructor(build, manager) { | ||
this.initialOptions = { ...build.initialOptions }; | ||
build.initialOptions.metafile = true; | ||
@@ -308,2 +309,10 @@ this.manager = manager; | ||
/** | ||
* Get initial build options. | ||
* @returns The initial options object. | ||
*/ | ||
getInitialOptions() { | ||
return this.initialOptions; | ||
} | ||
/** | ||
* Get build options. | ||
@@ -1074,3 +1083,3 @@ * @returns The options object. | ||
async emitChunk(options) { | ||
const initialOptions = this.getOptions(); | ||
const buildOptions = this.getOptions(); | ||
const format = options.format || this.getOption('format'); | ||
@@ -1081,3 +1090,3 @@ const virtualOutDir = this.getFullOutDir() || this.getWorkingDir(); | ||
const config = { | ||
...initialOptions, | ||
...buildOptions, | ||
format, | ||
@@ -1087,11 +1096,11 @@ outdir: options.outdir ? | ||
this.getFullOutDir(), | ||
bundle: options.bundle ?? initialOptions.bundle, | ||
splitting: format === 'esm' ? (options.splitting ?? initialOptions.splitting) : false, | ||
platform: options.platform ?? initialOptions.platform, | ||
target: options.target ?? initialOptions.target, | ||
plugins: options.plugins ?? initialOptions.plugins, | ||
external: options.external ?? initialOptions.external, | ||
jsxFactory: ('jsxFactory' in options) ? options.jsxFactory : initialOptions.jsxFactory, | ||
entryNames: initialOptions.chunkNames || initialOptions.entryNames, | ||
write: initialOptions.write ?? true, | ||
bundle: options.bundle ?? buildOptions.bundle, | ||
splitting: format === 'esm' ? (options.splitting ?? buildOptions.splitting) : false, | ||
platform: options.platform ?? buildOptions.platform, | ||
target: options.target ?? buildOptions.target, | ||
plugins: options.plugins ?? buildOptions.plugins, | ||
external: options.external ?? this.getInitialOptions().external, | ||
jsxFactory: ('jsxFactory' in options) ? options.jsxFactory : buildOptions.jsxFactory, | ||
entryNames: buildOptions.chunkNames || buildOptions.entryNames, | ||
write: buildOptions.write ?? true, | ||
globalName: undefined, | ||
@@ -1152,3 +1161,3 @@ outfile: undefined, | ||
const manager = this.manager; | ||
const initialOptions = this.getOptions(); | ||
const buildOptions = this.getOptions(); | ||
const format = options.format || this.getOption('format'); | ||
@@ -1169,11 +1178,11 @@ const entryPoints = options.entryPoints; | ||
outdir: options.outdir ? this.resolvePath(options.outdir) : this.getFullOutDir(), | ||
bundle: options.bundle ?? initialOptions.bundle, | ||
splitting: format === 'esm' ? (options.splitting ?? initialOptions.splitting ?? true) : false, | ||
platform: options.platform ?? initialOptions.platform, | ||
target: options.target ?? initialOptions.target, | ||
plugins: options.plugins ?? initialOptions.plugins, | ||
external: options.external ?? initialOptions.external, | ||
jsxFactory: ('jsxFactory' in options) ? options.jsxFactory : initialOptions.jsxFactory, | ||
entryNames: initialOptions.chunkNames || initialOptions.entryNames, | ||
write: initialOptions.write ?? true, | ||
bundle: options.bundle ?? buildOptions.bundle, | ||
splitting: format === 'esm' ? (options.splitting ?? buildOptions.splitting ?? true) : false, | ||
platform: options.platform ?? buildOptions.platform, | ||
target: options.target ?? buildOptions.target, | ||
plugins: options.plugins ?? buildOptions.plugins, | ||
external: options.external ?? this.getInitialOptions().external, | ||
jsxFactory: ('jsxFactory' in options) ? options.jsxFactory : buildOptions.jsxFactory, | ||
entryNames: buildOptions.chunkNames || buildOptions.entryNames, | ||
write: buildOptions.write ?? true, | ||
globalName: undefined, | ||
@@ -1180,0 +1189,0 @@ outfile: undefined, |
{ | ||
"name": "@chialab/esbuild-rna", | ||
"type": "module", | ||
"version": "0.17.0", | ||
"version": "0.17.1", | ||
"description": "A framework for esbuild plugins with transform and emit capabilities.", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66783
1872