legal: Make esbuild generate & link licensing information

This commit is contained in:
Vendicated 2022-10-20 19:21:21 +02:00 committed by Ven
parent 50047dd3c2
commit c80ed1b824
3 changed files with 7 additions and 11 deletions

View file

@ -13,7 +13,8 @@ export const commonOpts = {
bundle: true,
watch,
minify: !watch,
sourcemap: watch ? "inline" : ""
sourcemap: watch ? "inline" : "",
legalComments: "linked"
};
// https://github.com/evanw/esbuild/issues/619#issuecomment-751995294
@ -23,7 +24,7 @@ export const commonOpts = {
export const makeAllPackagesExternalPlugin = {
name: "make-all-packages-external",
setup(build) {
let filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/; // Must not start with "/" or "./" or "../"
const filter = /^[^./]|^\.[^./]|^\.\.[^/]/; // Must not start with "/" or "./" or "../"
build.onResolve({ filter }, args => ({ path: args.path, external: true }));
},
};