-
Notifications
You must be signed in to change notification settings - Fork 6
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
build: enhancements for parcel #275
Conversation
Quality Gate passedIssues Measures |
🎨 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-275 |
".": { | ||
"import": "./dist/index.js", | ||
"types": "./dist/@types/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"./alpha": { | ||
"import": "./dist/alpha.js", | ||
"types": "./dist/@types/alpha/index.d.ts", | ||
"default": "./dist/alpha.js" | ||
} |
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.
Parcel needs these so that it can find the right type files.
"module": "ESNext", | ||
"module": "node16", | ||
"target": "ES2017", | ||
"jsx": "react-jsx", | ||
"lib": ["ESNext", "ES5", "ES6", "DOM", "DOM.Iterable"], | ||
"sourceMap": true, | ||
"strict": true, | ||
"allowJs": false, | ||
"moduleResolution": "node", | ||
"moduleResolution": "node16", | ||
"forceConsistentCasingInFileNames": true, |
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.
ts documentation highly recommends that libraries use node16 or nodenext. This does not mean that our library has to use v16 of node.
Description
typeVersions are used to get the correct types using most bundlers. These don't seem to work with Parcel so we also include export subpaths with conditional exports which do work with parcel.
We need both.