esm - remove build support for `prepend`
parent
87f3486f5f
commit
7d428d77a0
|
@ -51,6 +51,7 @@ export interface IEntryPoint {
|
|||
name: string;
|
||||
include?: string[];
|
||||
exclude?: string[];
|
||||
/** @deprecated unsupported by ESM */
|
||||
prepend?: IExtraFile[];
|
||||
dest?: string;
|
||||
}
|
||||
|
|
|
@ -64,14 +64,6 @@ function optimizeESMTask(opts) {
|
|||
});
|
||||
}
|
||||
};
|
||||
// support for 'preprend' via the esbuild#banner
|
||||
if (entryPoint.prepend?.length) {
|
||||
for (const item of entryPoint.prepend) {
|
||||
const fullpath = path.join(REPO_ROOT_PATH, opts.src, item.path);
|
||||
const source = await fs.promises.readFile(fullpath, 'utf8');
|
||||
banner.js += source + '\n';
|
||||
}
|
||||
}
|
||||
const task = esbuild.build({
|
||||
bundle: true,
|
||||
external: entryPoint.exclude,
|
||||
|
|
|
@ -96,15 +96,6 @@ function optimizeESMTask(opts: IOptimizeESMTaskOpts): NodeJS.ReadWriteStream {
|
|||
}
|
||||
};
|
||||
|
||||
// support for 'preprend' via the esbuild#banner
|
||||
if (entryPoint.prepend?.length) {
|
||||
for (const item of entryPoint.prepend) {
|
||||
const fullpath = path.join(REPO_ROOT_PATH, opts.src, item.path);
|
||||
const source = await fs.promises.readFile(fullpath, 'utf8');
|
||||
banner.js += source + '\n';
|
||||
}
|
||||
}
|
||||
|
||||
const task = esbuild.build({
|
||||
bundle: true,
|
||||
external: entryPoint.exclude,
|
||||
|
|
Loading…
Reference in New Issue