-
Notifications
You must be signed in to change notification settings - Fork 809
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
Protect Components: Use @wordpress/dataviews/wp import path #41510
base: add/protect/core
Are you sure you want to change the base?
Changes from all commits
9633458
4644928
33b77fc
4b13484
0de3241
09b9e2d
d3941a0
df4416d
1791902
0bbb378
4b590d0
42d2496
8d55b07
0cd0079
d5d4226
332a427
c97a1b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Implement the WP-specific import path for the DataViews component. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Update build to support using DataViews from @automattic/jetpack-components. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,13 +39,56 @@ module.exports = [ | |
* @see https://github.com/Automattic/jetpack/issues/39907 | ||
*/ | ||
jetpackWebpackConfig.TranspileRule( { | ||
includeNodeModules: [ '@wordpress/dataviews/' ], | ||
includeNodeModules: [ '@wordpress/dataviews/build-wp/' ], | ||
babelOpts: { | ||
configFile: false, | ||
plugins: [ | ||
[ | ||
require.resolve( '@automattic/babel-plugin-replace-textdomain' ), | ||
{ textdomain: 'jetpack-protect' }, | ||
{ | ||
textdomain: 'jetpack-protect', | ||
functions: { | ||
__: 1, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need the Was the compiling manual? If yes, would that mean updating things here if the core DataViews package adds more i18n functions in its code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The real problem is that It turns out that Webpack as used in this particular PR currently winds up undoing all the bad import aliasing, going back to the correct Someday, when Core distributes |
||
__1: 1, | ||
__2: 1, | ||
__3: 1, | ||
__4: 1, | ||
__5: 1, | ||
__6: 1, | ||
__7: 1, | ||
__8: 1, | ||
__9: 1, | ||
__10: 1, | ||
__11: 1, | ||
__12: 1, | ||
__13: 1, | ||
__14: 1, | ||
__15: 1, | ||
__16: 1, | ||
__17: 1, | ||
__18: 1, | ||
__19: 1, | ||
__20: 1, | ||
__21: 1, | ||
__22: 1, | ||
__23: 1, | ||
__24: 1, | ||
__25: 1, | ||
__26: 1, | ||
__27: 1, | ||
__28: 1, | ||
__29: 1, | ||
__30: 1, | ||
_x: 2, | ||
_x1: 2, | ||
_x2: 2, | ||
_x3: 2, | ||
_x4: 2, | ||
_x5: 2, | ||
_n: 3, | ||
_nx: 4, | ||
}, | ||
}, | ||
], | ||
], | ||
}, | ||
|
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.
How did you compile this list? Was it by looking at the errors during building?
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 don't remember how I got it for WordPress/gutenberg#67864. 😀 Possibly that, or possibly by grepping
build-wp/index.js
forimport
statements and then removing the ones that are already dependencies of@wordpress/dataviews
.