Skip to content

Commit

Permalink
fix rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerbenw committed Oct 16, 2024
1 parent a3a61cd commit 8224182
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .rollup/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ const defaultOptions = () => ({

const sharedOutput = {
dir: 'dist',
entryFileNames: '[name].js',
preserveModules: true,
generatedCode: {
preset: 'es2015',
}
Expand All @@ -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'
}
],
Expand Down

0 comments on commit 8224182

Please sign in to comment.