Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes:
typesVersions
to resolve types for subpackes exports other than default for node10 module resolution.idea
in.gitignore
to exclude JetBrains IDE stuff (similar to.vscode
folder)files
to package.json to include onlydist
folder, we don't need 800KB of source code, you've the repo here (from +800KB to 260KB only)scripts/postbuild.mjs
to add.js
extension in dts files importing from dist folder and runs it in thebuild
scriptWe can remove also the
require
entry in the default package exports since the build doesn't generatecjs
files, the module using imports. Why do we need the./dist/react-legacy/pwa-install.react-legacy.js
in the package exports? This should be removed , importing from@khmyznikov/pwa-install/react-legacy
should now work.NOTE: you should check it before releasing it in some project to check if the changes in this PR works (I can check it using Vite in this repo https://github.com/sunflower-land/sunflower-land/blob/e42df72f13b17fd514e8953855c858ca79b464f4/src/features/pwa/PWAInstallProvider.tsx#L10).
Without this PR (https://arethetypeswrong.github.io/?p=%40khmyznikov%2Fpwa-install%400.4.8):
With this PR (run
npm run build && npm pack
in this PR and then upload the tgz file to https://arethetypeswrong.github.io/):