From 7e65b60e8e85974d84566ab2575cc22566d6026b Mon Sep 17 00:00:00 2001 From: Robert Ing Date: Fri, 8 Nov 2024 09:36:29 -0500 Subject: [PATCH] ci: Add esm support --- rollup.config.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 2206de8..c483943 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -8,7 +8,7 @@ export default [ file: 'dist/BrazeKit.iife.js', format: 'iife', exports: 'named', - name: 'mpBrazeKitV4', + name: 'mpBrazeKitV5', strict: false, inlineDynamicImports: true, }, @@ -25,7 +25,24 @@ export default [ file: 'dist/BrazeKit.common.js', format: 'cjs', exports: 'named', - name: 'mpBrazeKitV4', + name: 'mpBrazeKitV5', + strict: false, + inlineDynamicImports: true, + }, + plugins: [ + resolve({ + browser: true, + }), + commonjs(), + ], + }, + { + input: 'src/BrazeKit-dev.js', + output: { + file: 'dist/BrazeKit.esm.js', + format: 'esm', + exports: 'named', + name: 'mpBrazeKitV5', strict: false, inlineDynamicImports: true, },