build: fix esbuild build options
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 30 Oct 2023 13:29:01 +0000 (14:29 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 30 Oct 2023 13:29:01 +0000 (14:29 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
bundle.js

index ede14a96878f585ceccbed7208cd61038dbce685..84b45f8df4a15c8de630b779d860c41449a8310b 100644 (file)
--- a/bundle.js
+++ b/bundle.js
@@ -17,7 +17,11 @@ const sourcemap = !!isDevelopmentBuild;
     external: ['@mikro-orm/*'],
     minify: true,
     sourcemap,
+    entryNames: '[name]',
     outdir: './dist',
+    banner: {
+      js: "import { createRequire } from 'module';const require = createRequire(import.meta.url);",
+    },
     plugins: [
       clean({
         patterns: [