diff --git a/package.json b/package.json index 6831e501..da4c37a0 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "2.3.14", "description": "A small library for creating marquees.", "main": "./dist/dynamic-marquee.js", + "module": "./dist/dynamic-marquee.mjs", "types": "./dist/dynamic-marquee.d.ts", "scripts": { "build": "rollup --config rollup.config.mjs", diff --git a/rollup.config.mjs b/rollup.config.mjs index 7520b91a..404667c3 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -18,9 +18,15 @@ export default { onwarn: (e) => { throw new Error(e); }, - output: { - name: 'dynamicMarquee', - file: 'dist/dynamic-marquee.js', - format: 'umd', - }, + output: [ + { + name: 'dynamicMarquee', + file: 'dist/dynamic-marquee.js', + format: 'umd', + }, + { + file: 'dist/dynamic-marquee.mjs', + format: 'es', + }, + ], };