Skip to content

Commit

Permalink
Add ES output to rollup configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienCassou committed Apr 4, 2024
1 parent d56feef commit d3f2a65
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Next

- Fix #755: export EcmaScript modules in dist/es/. Thanks @DamienCassou

### 2.4.0

- Update a ton of dependencies. Thanks @BenjaminVanRyseghem
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"percentage"
],
"main": "./dist/numbro.min.js",
"browser": "./dist/es/numbro.js",
"typings": "./numbro.d.ts",
"engines": {
"node": "*"
Expand Down
15 changes: 15 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ export default async () => {
plugins: [terser()],
name: "numbro"
},
{
file: path.resolve(outputFolder, "es", "numbro.js"),
format: "es",
name: "numbro"
},
],
plugins,
},
Expand All @@ -72,6 +77,11 @@ export default async () => {
plugins: [terser()],
name: `numbro.${baseName}`
},
{
file: path.resolve(outputFolder, "es", "languages", `${baseName}.js`),
format: "es",
name: `numbro.${baseName}`
},
],
plugins,
};
Expand All @@ -86,6 +96,11 @@ export default async () => {
plugins: [terser()],
name: `numbro.allLanguages`
},
{
file: path.resolve(outputFolder, "es", "languages.js"),
format: "es",
name: `numbro.allLanguages`
},
],
plugins,
}
Expand Down

0 comments on commit d3f2a65

Please sign in to comment.