Skip to content

Commit

Permalink
fix: plugins are not executing because they are exported as iife
Browse files Browse the repository at this point in the history
  • Loading branch information
ramboz committed Jan 17, 2025
1 parent 361afee commit dfc1eea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,23 @@ const bundles = [
...['cwv', 'form', 'martech', 'onetrust', 'video'].map((plugin) => ({
source: `plugins/${plugin}.js`,
outputFile: `src/plugins/${plugin}`,
format: 'es',
})),
];

export default [...bundles.map(({ outputFile, source }) => ({
export default [...bundles.map(({ outputFile, source, format }) => ({
input: source,
output: [
{
file: `${outputFile}.map.js`,
format: 'iife',
format: format || 'iife',
sourcemap: 'inline',
exports: 'auto',
banner,
},
{
file: `${outputFile}.js`,
format: 'iife',
format: format || 'iife',
sourcemap: false,
exports: 'auto',
banner,
Expand Down

0 comments on commit dfc1eea

Please sign in to comment.