Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ES output to rollup configuration #756

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading