Skip to content

Commit

Permalink
fix(rollup): fix umd output (#1298)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Aug 20, 2021
1 parent 7c8e967 commit 169b12a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ packagesConfig.push({
packagesConfig.push({
output: build === 'browser' ? 'algoliasearch' : 'algoliasearch-lite',
package: 'algoliasearch',
name: 'algoliasearch',
input: `src/builds/${build}.ts`,
formats: ['esm-browser'],
ignore: ['crypto'],
Expand All @@ -89,6 +90,7 @@ packagesConfig.push({
packagesConfig.push({
output: build === 'browser' ? 'algoliasearch' : 'algoliasearch-lite',
package: 'algoliasearch',
name: 'algoliasearch',
input: `src/builds/${build}.ts`,
formats: ['umd'],
external: ['dom'],
Expand All @@ -103,12 +105,14 @@ packagesConfig.push(
{
output: 'recommend',
package: 'recommend',
name: '@algolia/recommend',
input: `src/builds/browser.ts`,
formats: ['esm-browser', 'umd'],
},
{
output: 'recommend',
package: 'recommend',
name: '@algolia/recommend',
input: `src/builds/node.ts`,
formats: ['cjs'],
}
Expand Down Expand Up @@ -159,7 +163,7 @@ packagesConfig
const isEsmBrowserBuild = /\.esm.browser.js$/.test(output.file);

if (isUmdBuild) {
output.name = 'algoliasearch';
output.name = packageConfig.name;
output.banner = createLicence(output.file);
}

Expand Down

0 comments on commit 169b12a

Please sign in to comment.