-
Notifications
You must be signed in to change notification settings - Fork 800
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
Add webpack-config package #21482
Add webpack-config package #21482
Conversation
71724e4
to
6c95097
Compare
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. |
6c95097
to
576bea3
Compare
Caution: This PR has changes that must be merged to WordPress.com |
c4a4ca1
to
09556ec
Compare
This is intended to (eventually) take care of several issues in the monorepo: * Calypso [doesn't use their own calyspo-build webpack config][1], which means it's not likely to be well-maintained. * It needs a hack to [work with monorepo packages][2]. * And another to [get correct image paths][3]. * And it [tries to redefine NODE_ENV, producing warnings][4]. * And we have to [override a weird default everywhere][5]. * We have to [name our JS files with ".min.js"][6] to avoid their being broken by a wpcom minifier, but WordPress.org's translation infrastructure [ignores such files][7]. * The plugin used to fix the above [had to be forked][8], adds 772K to the plugin, and results in spurious changes in TC builds. * The way translations are [being loaded for lazy-loaded bundles][9] is pretty hacky and doesn't lazy-load them. * We can't use any cache busting for the lazy-loaded bundles, because embedding hashes in the filename breaks the link to the translation file and putting it in a query parameter [breaks building the RTL css][10]. * Webpack's minification is [losing translator comments][11]. * Calypso-build has a lot of peer dependencies we don't actually need. Not everything we have uses sass or postcss, and we have our own infrastructure for jest, react, and so on. Currently we just ignore the 76 warnings from that. This is the first step towards fixing that: creating a private package that can hold the webpack and babel config fragments that we can share throughout the monorepo. Then we'll have a place to put the fixes for some of the other issues too. [1]: #21004 (comment) [2]: Automattic/wp-calypso#53353 [3]: Automattic/wp-calypso#56111 [4]: Automattic/wp-calypso#56291 [5]: #21004 [6]: #20484 [7]: #21343 [8]: https://github.com/Automattic/jetpack/blob/7a5edd83/projects/plugins/jetpack/tools/webpack.helpers.js#L35 [9]: #20926 [10]: #21349 [11]: #16549
09556ec
to
8b9263f
Compare
0e243b1
to
2d34e9d
Compare
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.
My internet is acting up and I'm having trouble pushing a resolution commit to get fix the lock file.
Otherwise, looks logical to me.
Great news! One last step: head over to your WordPress.com diff, D68789-code, and commit it. Thank you! |
…ng-formatting * master: docker: Add script to create "fake" translations for testing i18n (#21407) Add webpack-config package (#21482) Update dependency composer/semver to v3.2.6 (#21608) Update dependency eslint-plugin-import to v2.25.2 (#21607) Update JS unit testing packages (#21605) Admin page: Fix pricing/currency displayed on the upgrade page (#21594) Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599) Publicize: Add new publicize icon toggle component (#20957) Search: hide search menu for atomic sites (#21565) Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549) tooling: Add `.mjs` as a JavaScript extension (#21589) Jetpack: PHPCS src/class-tracking (#21583) Publicize: make the default social media message blank (#21477)
* master: docker: Add script to create "fake" translations for testing i18n (#21407) Add webpack-config package (#21482) Update dependency composer/semver to v3.2.6 (#21608) Update dependency eslint-plugin-import to v2.25.2 (#21607) Update JS unit testing packages (#21605) Admin page: Fix pricing/currency displayed on the upgrade page (#21594) Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599) Publicize: Add new publicize icon toggle component (#20957) Search: hide search menu for atomic sites (#21565) Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549) tooling: Add `.mjs` as a JavaScript extension (#21589) Jetpack: PHPCS src/class-tracking (#21583) Publicize: make the default social media message blank (#21477)
* master: (40 commits) docker: Add script to create "fake" translations for testing i18n (#21407) Add webpack-config package (#21482) Update dependency composer/semver to v3.2.6 (#21608) Update dependency eslint-plugin-import to v2.25.2 (#21607) Update JS unit testing packages (#21605) Admin page: Fix pricing/currency displayed on the upgrade page (#21594) Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599) Publicize: Add new publicize icon toggle component (#20957) Search: hide search menu for atomic sites (#21565) Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549) tooling: Add `.mjs` as a JavaScript extension (#21589) Jetpack: PHPCS src/class-tracking (#21583) Publicize: make the default social media message blank (#21477) Photon: do not serve Wikipedia images from CDN. (#21572) Publicize: update endpoint (#21510) [Plugin] Backup: Update initial backup screen (#21559) RNA Connect Screen: Remove unused files (#21570) RNA Connection: Add ConnectScreenRequiredPlan Component (#21521) Update PHPUnit coverage configs (#21557) cli: Fix skeleton phpunit config (#21555) ...
r234325-wpcom |
Changes proposed in this Pull Request:
This is intended to (eventually) take care of several issues in the
monorepo:
which means it's not likely to be well-maintained.
broken by a wpcom minifier, but WordPress.org's translation
infrastructure ignores such files.
the plugin, and results in spurious changes in TC builds.
pretty hacky and doesn't lazy-load them.
embedding hashes in the filename breaks the link to the translation
file and putting it in a query parameter breaks building the RTL css.
Not everything we have uses sass or postcss, and we have our own
infrastructure for jest, react, and so on. Currently we just ignore
the 76 warnings from that.
This is the first step towards fixing that: creating a private package
that can hold the webpack and babel config fragments that we can share
throughout the monorepo. Then we'll have a place to put the fixes for
some of the other issues too.
Jetpack product discussion
PT: p9dueE-3MG-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions: