@@ -76,22 +76,11 @@ const makeConfig = ({
76
76
input,
77
77
plugins : [
78
78
externals ( ) ,
79
- modify (
80
- {
81
- // prettier-ignore
82
- find : / ' _ _ C I T A T I O N S _ _ ' / g,
83
- replace : JSON . stringify ( citationData , null , 2 ) ,
84
- } ,
85
- {
86
- // Patch to mitigate DOM Clobbering vulnerability
87
- find : / d o c u m e n t \. c u r r e n t S c r i p t / g,
88
- replace : `(typeof document !== 'undefined' &&
89
- document.currentScript &&
90
- document.currentScript.tagName &&
91
- document.currentScript.tagName.toUpperCase() === 'SCRIPT' &&
92
- document.currentScript)` ,
93
- }
94
- ) ,
79
+ modify ( {
80
+ // prettier-ignore
81
+ find : / ' _ _ C I T A T I O N S _ _ ' / g,
82
+ replace : JSON . stringify ( citationData , null , 2 ) ,
83
+ } ) ,
95
84
esbuild ( { ...esBuildPluginOptions , target : "node18" } ) ,
96
85
commonjs ( commonjsPluginOptions ) ,
97
86
] ,
@@ -117,22 +106,11 @@ const makeConfig = ({
117
106
input,
118
107
plugins : [
119
108
externals ( { deps : false } ) ,
120
- modify (
121
- {
122
- // prettier-ignore
123
- find : / ' _ _ C I T A T I O N S _ _ ' / g,
124
- replace : JSON . stringify ( citationData , null , 2 ) ,
125
- } ,
126
- {
127
- // Patch to mitigate DOM Clobbering vulnerability
128
- find : / d o c u m e n t \. c u r r e n t S c r i p t / g,
129
- replace : `(typeof document !== 'undefined' &&
130
- document.currentScript &&
131
- document.currentScript.tagName &&
132
- document.currentScript.tagName.toUpperCase() === 'SCRIPT' &&
133
- document.currentScript)` ,
134
- }
135
- ) ,
109
+ modify ( {
110
+ // prettier-ignore
111
+ find : / ' _ _ C I T A T I O N S _ _ ' / g,
112
+ replace : JSON . stringify ( citationData , null , 2 ) ,
113
+ } ) ,
136
114
resolve ( { preferBuiltins : false } ) ,
137
115
esbuild ( { ...esBuildPluginOptions , target : "esnext" } ) ,
138
116
commonjs ( commonjsPluginOptions ) ,
@@ -152,22 +130,11 @@ const makeConfig = ({
152
130
input,
153
131
plugins : [
154
132
externals ( { deps : false } ) ,
155
- modify (
156
- {
157
- // prettier-ignore
158
- find : / ' _ _ C I T A T I O N S _ _ ' / g,
159
- replace : JSON . stringify ( citationData , null , 2 ) ,
160
- } ,
161
- {
162
- // Patch to mitigate DOM Clobbering vulnerability
163
- find : / d o c u m e n t \. c u r r e n t S c r i p t / g,
164
- replace : `(typeof document !== 'undefined' &&
165
- document.currentScript &&
166
- document.currentScript.tagName &&
167
- document.currentScript.tagName.toUpperCase() === 'SCRIPT' &&
168
- document.currentScript)` ,
169
- }
170
- ) ,
133
+ modify ( {
134
+ // prettier-ignore
135
+ find : / ' _ _ C I T A T I O N S _ _ ' / g,
136
+ replace : JSON . stringify ( citationData , null , 2 ) ,
137
+ } ) ,
171
138
resolve ( { preferBuiltins : false } ) ,
172
139
esbuild ( { ...esBuildPluginOptions , target : "es2015" , minify : true } ) ,
173
140
commonjs ( commonjsPluginOptions ) ,
0 commit comments