diff --git a/.changeset/big-swans-cover.md b/.changeset/big-swans-cover.md new file mode 100644 index 00000000..d5fb8327 --- /dev/null +++ b/.changeset/big-swans-cover.md @@ -0,0 +1,5 @@ +--- +"@meilisearch/instant-meilisearch": patch +--- + +Fix wrong "meilisearch" client being imported in UMD bundle. diff --git a/packages/instant-meilisearch/rollup.config.js b/packages/instant-meilisearch/rollup.config.js index b11ddc4d..41d121ac 100644 --- a/packages/instant-meilisearch/rollup.config.js +++ b/packages/instant-meilisearch/rollup.config.js @@ -38,7 +38,6 @@ const ROLLUP_OPTIONS = [ // browser-friendly IIFE build { input: INPUT, // directory to transpilation of typescript - external: ['cross-fetch', 'cross-fetch/polyfill'], output: { name: 'window', extend: true, @@ -55,11 +54,7 @@ const ROLLUP_OPTIONS = [ }, plugins: [ ...COMMON_PLUGINS, - nodeResolve({ - mainFields: ['jsnext', 'browser', 'main'], - preferBuiltins: true, - browser: true, - }), + nodeResolve({ exportConditions: ['browser'] }), commonjs(), babel(), // json(),