-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Data Stores: Disable automatic type inclusion #38688
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good solution 👍
Automatically including type definitions can be problematic. Only include imported types. See tsconfig types documentation: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types
1581b1e
to
7e6499f
Compare
I had to apply the fix to all the tsconfigs in use as well as one additional change. This should be working well now. |
@@ -1,4 +1,4 @@ | |||
require( '@babel/polyfill' ); | |||
import '@babel/polyfill'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbloomf This seem OK to you?
"target": "ES5", | ||
"lib": [ "DOM", "ES2015", "ScriptHost" ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbloomf This seem OK to you?
My understanding is that target ES5 changes compiled output, while lib allows all ES2015 features, e.g. Promise
, Set
.
Automatically including type definitions can be problematic. Only
include imported types.
See tsconfig types documentation:
https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types
Orinially reported by @jsnajdr
Testing instructions
npm run distclean && npm run update-deps
will error on master (like above) but will correctly build on this branch.npx lerna run prepare --scope='@automattic/data-stores'
is the specific command that would fail