You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Todo rewrite Zen imports in ESM mode but after code is processed by bundler?
43
-
44
56
return{
45
57
code: modifiedCode,
46
58
};
47
59
},
48
60
},
61
+
62
+
buildEnd: ()=>{
63
+
if(outputFormat==="esm"&&importFound===true){
64
+
thrownewError(
65
+
"Aikido: Detected import of '@aikidosec/firewall/instrument' in your code while building an ESM bundle. Please remove this import and preload the library by running Node.js with the --require option instead. See our ESM documentation for more information."
66
+
);
67
+
}
68
+
69
+
if(outputFormat==="cjs"&&importFound===false){
70
+
thrownewError(
71
+
"Aikido: Missing import of '@aikidosec/firewall/instrument' in your code while building a CJS bundle. Please add this as the first line of your application's entry point file to ensure proper instrumentation."
0 commit comments