Skip to content
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

Merged
merged 1 commit into from
May 1, 2024
Merged

build: enhancements for parcel #275

merged 1 commit into from
May 1, 2024

Conversation

marshallpete
Copy link
Member

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.

Copy link

sonarcloud bot commented May 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

github-actions bot commented May 1, 2024

Comment on lines +9 to +18
".": {
"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"
}
Copy link
Member Author

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.

Comment on lines -5 to 13
"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,
Copy link
Member Author

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.

@marshallpete marshallpete merged commit a3f4d84 into main May 1, 2024
5 checks passed
@marshallpete marshallpete deleted the buildUpdates branch May 1, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants