File tree Expand file tree Collapse file tree
packages/vite-plugin-monkey/src/node/plugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,14 +260,18 @@ export const buildBundleFactory = (
260260 rolldownOptions : {
261261 external : Object . keys ( option . globalsPkg2VarName ) ,
262262 output : {
263+ // set some default values which may be overridden by custom viteConfig
264+ comments : false ,
265+ strict : false , // rolldown will add 'use strict' to the file top instead of the wrapper function next line
266+ intro : `'use strict'` ,
267+
268+ // preserve output options set in viteConfig, allow overriding values set above
269+ ...viteConfig . build . rolldownOptions . output ,
263270 // disable rolldown minify when using terser or esbuild, see #280
264271 ...( rolldownMinify !== undefined
265272 ? { minify : rolldownMinify }
266273 : { } ) ,
267274 globals : option . globalsPkg2VarName ,
268- comments : false ,
269- strict : false , // rolldown will add 'use strict' to the file top instead of the wrapper function next line
270- intro : `'use strict'` ,
271275 } ,
272276 experimental : {
273277 attachDebugInfo : 'none' ,
You can’t perform that action at this time.
0 commit comments