Skip to content

Commit 03130bf

Browse files
Merge #1737
1737: Fix package exports r=curquiza a=flevi29 # Pull Request ## Related issue Fixes #1736 ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: F. Levi <[email protected]>
2 parents 8f43b17 + 77f914b commit 03130bf

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"qdequele <[email protected]>"
1717
],
1818
"license": "MIT",
19-
"main": "./dist/bundles/meilisearch.cjs.js",
20-
"module": "./dist/bundles/meilisearch.esm.js",
21-
"browser": "./dist/bundles/meilisearch.umd.js",
19+
"main": "./dist/bundles/meilisearch.cjs",
20+
"module": "./dist/bundles/meilisearch.mjs",
2221
"typings": "./dist/types/index.d.ts",
2322
"types": "./dist/types/index.d.ts",
2423
"jsdelivr": "./dist/bundles/meilisearch.umd.js",
@@ -27,8 +26,8 @@
2726
".": {
2827
"types": "./dist/types/index.d.ts",
2928
"browser": "./dist/bundles/meilisearch.umd.js",
30-
"import": "./dist/bundles/meilisearch.esm.js",
31-
"require": "./dist/bundles/meilisearch.cjs.js",
29+
"import": "./dist/bundles/meilisearch.mjs",
30+
"require": "./dist/bundles/meilisearch.cjs",
3231
"default": "./dist/bundles/meilisearch.umd.js"
3332
}
3433
},
@@ -56,7 +55,7 @@
5655
"test:env:nodejs": "yarn build && node tests/env/node/index.js && node tests/env/node/getting_started.js",
5756
"test:env:esm": "yarn --cwd tests/env/esm && yarn --cwd tests/env/esm start",
5857
"test:env:nitro-app": "yarn build && yarn --cwd tests/env/nitro-app test",
59-
"size": "node scripts/file-size ./dist/bundles/meilisearch.esm.min.js ./dist/bundles/meilisearch.umd.min.js",
58+
"size": "node scripts/file-size ./dist/bundles/meilisearch.mjs ./dist/bundles/meilisearch.umd.min.js",
6059
"style": "yarn fmt && yarn lint",
6160
"style:fix": "yarn fmt:fix && yarn lint:fix",
6261
"fmt": "prettier -c ./**/*.{js,ts}",

rollup.config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ module.exports = [
8585
sourcemap: env === "production", // create sourcemap for error reporting in production mode
8686
},
8787
],
88-
plugins: [
89-
env === "production" ? terser() : {}, // will minify the file in production mode
90-
...PLUGINS,
91-
],
88+
plugins: PLUGINS,
9289
},
9390
// Common JS build (Node).
9491
// Compatible only in a nodeJS environment.
@@ -102,7 +99,8 @@ module.exports = [
10299
),
103100
exports: "named",
104101
format: "cjs",
102+
sourcemap: env === "production", // create sourcemap for error reporting in production mode
105103
},
106-
plugins: [...PLUGINS],
104+
plugins: PLUGINS,
107105
},
108106
];

0 commit comments

Comments
 (0)