Skip to content

Commit cd22911

Browse files
committed
fix(build): move terser plugin to correct position
1 parent 35b856a commit cd22911

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rollup.config.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ const node_build = {
7171
/**
7272
* This configuration is designed to bundle the Strapi SDK for browser environments.
7373
*
74-
* It produces two outputs in the IIFE format, which are suitable for use in web browsers.
74+
* It an output using the IIFE format, which is suitable for use in web browsers.
7575
*
7676
* The bundle provides a globally available `strapi` variable and includes source maps for debugging.
77-
* In production, the bundle is minified for better performance.
77+
*
78+
* The bundle is minified for better performance.
7879
*
7980
* Outputs:
8081
* - IIFE Minified (dist/bundle.browser.min.js): a minified browser build, optimized for performance, with source maps.
@@ -97,7 +98,6 @@ const browser_build = {
9798
format: 'iife',
9899
name: 'strapi',
99100
sourcemap: true,
100-
plugins: [terser()],
101101
globals: {
102102
debug: () => () => {}, // Override debug to a no-op function
103103
},
@@ -120,6 +120,7 @@ const browser_build = {
120120
'process.browser': true,
121121
preventAssignment: true,
122122
}),
123+
terser(),
123124
],
124125
};
125126

0 commit comments

Comments
 (0)