-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/aegir/src/build/index.js b/node_modules/aegir/src/build/index.js
index 54537df..6df4c61 100644
--- a/node_modules/aegir/src/build/index.js
+++ b/node_modules/aegir/src/build/index.js
@@ -36,26 +36,31 @@ const build = async (argv) => {
entryPoint = fromRoot('dist', 'src', 'index.js')
}
- const result = await esbuild.build(defaults(
+ const config = defaults(
{
entryPoints: [entryPoint],
bundle: true,
- format: 'iife',
+ format: argv.fileConfig.build.config.format ?? 'iife',
conditions: ['production'],
sourcemap: argv.bundlesize,
minify: true,
globalName,
- banner: { js: umdPre },
- footer: { js: umdPost },
+ banner: argv.fileConfig.build.config.banner ?? { js: umdPre },
+ footer: argv.fileConfig.build.config.footer ?? { js: umdPost },
metafile: argv.bundlesize,
- outfile,
+ outfile: argv.fileConfig.build.config.outfile == null ? undefined : outfile,
define: {
global: 'globalThis',
'process.env.NODE_ENV': '"production"'
}
},
argv.fileConfig.build.config
- ))
+ )
+ if (config.outdir) {
+ delete config.outfile
+ }
+
+ const result = await esbuild.build(config)
if (result.metafile) {
fs.writeJSONSync(path.join(paths.dist, 'stats.json'), result.metafile)This issue body was partially generated by patch-package.
the above was generated by patch-package. Some things I was trying to do that caused me to create this:
- set outputdir instead of outfile
- change format
- remove banner and footer that were not needed for the format I wanted.
Metadata
Metadata
Assignees
Labels
No labels