Skip to content

Commit

Permalink
removing default es2022 value
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeiroguilherme committed Oct 30, 2024
1 parent 8eeff20 commit fb90559
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/lib/config/rollup.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ export const compileCSS = ({ extract = 'adyen.css' } = {}) =>
extract: extract
});

export const compileJavascript = ({ target = 'es2022', sourceMaps = false } = {}) =>
swc(
export const compileJavascript = ({ target, sourceMaps = false } = {}) => {
if (!target) {
throw Error('Rollup plugins: compileJavascript task - "target" is missing');
}

return swc(
defineRollupSwcOption({
tsconfig: '../tsconfig.json',
jsc: {
Expand All @@ -70,6 +74,7 @@ export const compileJavascript = ({ target = 'es2022', sourceMaps = false } = {}
inlineSourcesContent: false
})
);
};

export const minify = ({ isESM } = { isESM: true }) => terser({ module: isESM });

Expand Down

0 comments on commit fb90559

Please sign in to comment.