This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Update Builds Directories to Make Use of Both lib and dist#5739
Merged
Conversation
Deploying with
|
| Latest commit: |
266b612
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://232e7388.web3-js-docs.pages.dev |
| Branch Preview URL: | https://wyatt-4-x-fix-build.web3-js-docs.pages.dev |
avkos
approved these changes
Jan 10, 2023
luu-alex
reviewed
Jan 10, 2023
| "clean": "rimraf dist && rimraf lib", | ||
| "prebuild": "yarn clean", | ||
| "build": "tsc --build", | ||
| "build:check": "node -e \"require('./dist')\"", |
Contributor
There was a problem hiding this comment.
I think we need to update build:check as well
jdevcs
reviewed
Jan 10, 2023
| "license": "LGPL-3.0", | ||
| "files": [ | ||
| "dist/**/*" | ||
| "lib/**/*" |
Contributor
There was a problem hiding this comment.
For npm whitelisting only lib , this will filter out dist form including in published lib.
This will impact CDN as current CDN is configured to pick minified build through npm ( as per Greg info, I discussed with him last time ).
I personally like it, as it will reduce lib size , so users node_modules will be of less size ( by excluding minified builds) but we will need to configure explicitly CDN for 4.x.
jdevcs
reviewed
Jan 10, 2023
jdevcs
left a comment
Contributor
There was a problem hiding this comment.
tsconfig of some of package is not updated ( web3-erros eth-ens iban http ws rpc-methods )?, all packages should have consistent lib output.
Contributor
Author
luu-alex
approved these changes
Jan 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 moves the
tsccompiled files fromdist/tolib/for all packages that weren't already doing so. Additionally,web3andweb3-validatorwill compile their web builds todist/. These changes are to address an issue found when developing the Chainlink plugin that needs to build it's code for the browser. It was discovered that there was a filename conflict between files such as thetsccompiledweb3_validator.tsand it's webpack compiled version. By puttingtsccompiled files inlib/and webpack compiled files indist/, we completely avoid this issue for all packages, and users are able to pull in published4.xWeb3.js packages and build using webpack