From 82241826b27df848289925e692b6d1918e336ef3 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Wed, 16 Oct 2024 15:04:49 +0100 Subject: [PATCH] fix rollup config --- .rollup/index.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.rollup/index.mjs b/.rollup/index.mjs index 33425d8cb..ad9fd7128 100644 --- a/.rollup/index.mjs +++ b/.rollup/index.mjs @@ -16,8 +16,6 @@ const defaultOptions = () => ({ const sharedOutput = { dir: 'dist', - entryFileNames: '[name].js', - preserveModules: true, generatedCode: { preset: 'es2015', } @@ -31,10 +29,13 @@ function createRollupConfig (options = defaultOptions()) { output: options.output || [ { ...sharedOutput, + entryFileNames: '[name].js', format: 'cjs' }, { ...sharedOutput, + preserveModules: true, + entryFileNames: '[name].mjs', format: 'esm' } ],