-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
apollo-cache-inmemory: the new release seems to break the build #4332
Comments
Thanks for reporting this! The idea was supposed to be that the client packages would import Not sure yet why that isn't working as intended, but I will find out! |
948706f The commit linked above attempted to inline tslib helpers into our UMD bundles, but accidentally left actual tslib imports in the ESM files exposed through the `module` field in `package.json`, without installing tslib as a dependency. Since we're not currently bundling all of our ESM modules together into one bundle, inlining the helpers doesn't make sense, because they would be inlined at the top of every module where they were used, instead of being shared across all modules. However, importing tslib the normal way should work just fine, and tree-shaking bundlers can take care of pruning the unused helpers from the tslib package. Should fix #4332.
Thanks a lot! |
Should it be a peer dep? This is not working with pnpm. Ah I see its fixed. When will this be released? |
Intended outcome:
Installing apollo-cache-inmemory and using it in a project should work without problems.
Actual outcome:
Installing apollo-cache-inmemory and using it in a project breaks and shows the following error:
Module not found: Error: Can't resolve 'tslib'
It seems that the compiled version of apollo-cache-inmemory includes an import of tslib. But tslib does not appear in the apollo-cache-inmemory dependencies.
How to reproduce the issue:
Install apollo-cache-inmemory in a project where you are not using TypeScript and build the project using Webpack.
Versions
System:
OS: macOS High Sierra 10.13.6
Binaries:
Node: 8.5.0 - ~/.nvm/versions/node/v8.5.0/bin/node
Yarn: 1.6.0 - ~/.nvm/versions/node/v8.5.0/bin/yarn
npm: 5.8.0 - ~/.nvm/versions/node/v8.5.0/bin/npm
Browsers:
Chrome: 71.0.3578.98
Firefox: 60.0
Safari: 12.0.2
The text was updated successfully, but these errors were encountered: