From c80ed1b824b9f0b8aab8103cbde5e9b1f2c951c1 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 20 Oct 2022 19:21:21 +0200 Subject: legal: Make esbuild generate & link licensing information --- scripts/build/common.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs index deb8ff4..0def0c2 100644 --- a/scripts/build/common.mjs +++ b/scripts/build/common.mjs @@ -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 })); }, }; -- cgit