From 9018eb2e56fb6dde77b394435288b45e090fb2ac Mon Sep 17 00:00:00 2001
From: Iisakki Rotko <iisakki.rotko@gmail.com>
Date: Thu, 13 Feb 2025 13:44:17 +0100
Subject: [PATCH 1/2] ensure AMD headers aren't introduced in build

---
 esbuild-config.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/esbuild-config.js b/esbuild-config.js
index af323d85a98..fa0f6e70865 100644
--- a/esbuild-config.js
+++ b/esbuild-config.js
@@ -23,6 +23,7 @@ module.exports = {
     },
     define: {
         global: 'window',
+        'define.amd': 'false',
     },
     target: 'es2016',
     logLevel: 'info',

From 41900d092aeebfbaea265ace32f71207f08bd839 Mon Sep 17 00:00:00 2001
From: Iisakki Rotko <iisakki.rotko@gmail.com>
Date: Thu, 13 Feb 2025 17:14:07 +0100
Subject: [PATCH 2/2] Add draftlog

---
 draftlogs/7367_fix.md | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 draftlogs/7367_fix.md

diff --git a/draftlogs/7367_fix.md b/draftlogs/7367_fix.md
new file mode 100644
index 00000000000..2ec733eb405
--- /dev/null
+++ b/draftlogs/7367_fix.md
@@ -0,0 +1 @@
+- Fix importing plotly.js via require on pages with [AMD](https://en.wikipedia.org/wiki/Asynchronous_module_definition) [[#7367](https://github.com/plotly/plotly.js/pull/7367)]
\ No newline at end of file