Skip to content

Commit

Permalink
fix(build): move terser plugin to correct position
Browse files Browse the repository at this point in the history
  • Loading branch information
Convly committed Dec 23, 2024
1 parent 35b856a commit cd22911
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ const node_build = {
/**
* This configuration is designed to bundle the Strapi SDK for browser environments.
*
* It produces two outputs in the IIFE format, which are suitable for use in web browsers.
* It an output using the IIFE format, which is suitable for use in web browsers.
*
* The bundle provides a globally available `strapi` variable and includes source maps for debugging.
* In production, the bundle is minified for better performance.
*
* The bundle is minified for better performance.
*
* Outputs:
* - IIFE Minified (dist/bundle.browser.min.js): a minified browser build, optimized for performance, with source maps.
Expand All @@ -97,7 +98,6 @@ const browser_build = {
format: 'iife',
name: 'strapi',
sourcemap: true,
plugins: [terser()],
globals: {
debug: () => () => {}, // Override debug to a no-op function
},
Expand All @@ -120,6 +120,7 @@ const browser_build = {
'process.browser': true,
preventAssignment: true,
}),
terser(),
],
};

Expand Down

0 comments on commit cd22911

Please sign in to comment.