-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Conversation
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.
We need to observe these points explicitly.
- We are not building whole repository with webpack
- We are not also not building every package in the mono repo with the webpack
- We only need
web3
package to be build with the webpack.
So we have to be very explicit to create the configuration and build steps for particular packages which we need.
- Create a symlink of
webpackprod.config.js
underpackages/web3/
to follow the consistent pattern we have for other configuration files. - Create a task
postbuild
under thepackages/web3/package.json
to execute thewebpack
. - Create a directory
packages/web3/dist_web
for the output of webpack. - To keep the compatibility with
1.x
create a symlinkdist
on root level which points topackages/web3/dist_web
I will highly recommend to not commit the build files in the version control. That does not mean we will be breaking anything for users. We can build and keep the dist
folders when we publish the packages, so it will not be any issue for any user. Users who would be using local clones of the source code they would never bee using prebuild files anyway.
None of the above points will introduce any breaking changes for users. The way we are managing builds could be different on our end, which is fine as we have differences of many workflows compared to 1.x and 4.x.
I also agree with the text above. it makes sense to go this way. |
Thanks for your feedback. As discussed in call we can make these changes in future if there is any limitation or requirement for keeping webpack script at web3 package level. |
@jdevcs I was thinking on our discussion lately. During the ETHPrague when I introduced new schema based eth compatible validator to the community. It was one discussion point and I told them they can use these features in their projects independently of the Different web based package managers e.g. bower tend to utilize the browser field int he All these points aligned to the direction of building packages independently with webpack (for the packages we tend to think useable). |
I created a small PR to reflect what I am describing here. Let's see what other team members think about it. |
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.
need to fix one test or maybe just relaunch it
As explained in very details already, I don't think the direction of this PR is appropriate to proceed.
@nazarhussain As we discussed in call these are not urgent requirements in alpha for individual builds of other packages but instead some other items are urgent ( doc, breaking changes fixes, and some other PRs ) so when there is requirement we can implement enhancements after going through our sprint process and team discussion. |
Description
#5068
Type of change
Checklist:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
with success.dist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.