-
Notifications
You must be signed in to change notification settings - Fork 797
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: Base webpack.config.js on calypso-build's #12072
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: June 4, 2019. |
With this, we can probably get rid of Gulp task building styles for the dash, and use Webpack css pipeline instead: Lines 19 to 33 in 9bc1f0e
That doesn't have to happen in this PR, tho. |
4f46531
to
23ddd63
Compare
dd1539b
to
845aa49
Compare
845aa49
to
6ad68e7
Compare
Caution: This PR has changes that must be merged to WordPress.com |
Blocked by #12381 |
…12381) `tools/builder/react.js` uses `static.jsx` to produce minimal static markup (HTML) versions of the dashboard (really just "Turn on your JavaScript" notices). It `require()`s the webpack-bundled version of `static.jsx` to that end, and attaches `renderToStaticMarkup()`-produced strings to `window`, which it then writes to HTML files. Getting rid of the complexity added by passing information by attaching to `window` (and thus requiring `jsdom` etc) is the main objective of this PR. This is achieved by using `StaticSiteGeneratorPlugin`, which is meant for this kind of thing. In a subsequent PR, I hope to get rid of `tools/builder/react.js` pretty much entirely. This will make it much easier to base the build system for Jetpack's React Dashboard on `calypso-build` (see #12072).
6ad68e7
to
13f4a45
Compare
ockham, Your synced wpcom patch D28250-code has been updated. |
9dfbd29
to
68c3444
Compare
ockham, Your synced wpcom patch D28250-code has been updated. |
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.
I'm happy to see all the custom stuff slowly disappearing and being replaced by common build tools, thanks for working on this!
Works well for me both in dev and prod environments.
Changes proposed in this Pull Request:
Build: Base webpack.config.js on calypso-build's
This allows us to remove a few now-redundant Gulp tasks, since
calypso-build
takes care of e.g. minification, building CSS from SCSS, and RTL for us automatically.Testing instructions:
Builds without errors?
Smoke-test the React Dashboard. Watch the browser console for errors.
Also try
and verify that
_inc/build/admin.js
is minified.Proposed changelog entry for your changes: