Skip to content

Commit

Permalink
Allow Webpack & Rollup to tree-shake Core. (#239)
Browse files Browse the repository at this point in the history
This PR adds `"sideEffects": false` to the package.json. This
flag lets Webpack & Rollup know that search-core is safe to tree-shake.
Prior to this change, a PagesJS user was seeing the entirety of Core
included in their bundles, even though they were only using a small part
of its exported functionality.
  • Loading branch information
tmeyer2115 committed May 18, 2023
1 parent 79ed8a2 commit e89e3b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
@@ -1,10 +1,11 @@
{
"name": "@yext/search-core",
"version": "2.3.0",
"version": "2.3.1",
"description": "Typescript Networking Library for the Yext Search API",
"main": "./dist/commonjs/src/index.js",
"module": "./dist/esm/src/index.js",
"types": "./dist/bundle.d.ts",
"sideEffects": false,
"keywords": [
"networking",
"search api",
Expand Down

0 comments on commit e89e3b7

Please sign in to comment.