-
Notifications
You must be signed in to change notification settings - Fork 799
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
Transfer Verbum app into into jetpack-mu-wpcom #34993
Changes from 2 commits
40dc407
67760a1
88a257d
39570ea
b88da1c
b9bbdf3
0e1f43e
43a797f
d25ddb9
69afbe1
4833d6e
2117c38
be415c4
7a09ecc
1295e09
ca23f49
bcf2447
a696fca
d955ab6
5ac3a48
2cc6f0e
460cc92
e31d9a1
78885b2
63cf770
aa641ee
f99c93c
10f2507
9dc3f0e
ba2dd2e
a11f3e9
015c073
6c66b5d
e445ed7
9d197fd
43a064d
692cad2
6d9dbe3
aab85be
6bb491c
05c883f
4fa8476
898f921
4ce269a
7074f28
355ebdf
925423c
d9178e7
557dbc7
c0aed72
0af3b26
c64dc3c
70551b8
69dd842
8f0e01f
f0eedd1
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,11 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@babel/plugin-transform-react-jsx", | ||
{ | ||
"pragma": "h", | ||
"pragmaFrag": "Fragment" | ||
} | ||
] | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: added | ||
|
||
Add Verbum Comments in jetpack-mu-wpcom plugin |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
const path = require( 'path' ); | ||
const jetpackConfig = require( '@automattic/jetpack-webpack-config/webpack' ); | ||
const CopyPlugin = require( 'copy-webpack-plugin' ); | ||
const webpack = require( 'webpack' ); | ||
|
||
module.exports = { | ||
entry: { | ||
'error-reporting': './src/features/error-reporting/index.js', | ||
'verbum-comments': './src/features/verbum-comments/src/index.tsx', | ||
}, | ||
mode: jetpackConfig.mode, | ||
devtool: jetpackConfig.devtool, | ||
|
@@ -19,7 +22,28 @@ module.exports = { | |
...jetpackConfig.resolve, | ||
}, | ||
node: false, | ||
plugins: [ ...jetpackConfig.StandardPlugins() ], | ||
plugins: [ | ||
...jetpackConfig.StandardPlugins( { | ||
DependencyExtractionPlugin: { injectPolyfill: true }, | ||
MiniCssExtractPlugin: { filename: '[name]/[name].css' }, | ||
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. Outputs CSS in the same build directory as the entry. For Verbum, css will output in |
||
} ), | ||
new webpack.ProvidePlugin( { | ||
h: [ 'preact', 'h' ], | ||
Fragment: [ 'preact', 'Fragment' ], | ||
} ), | ||
new CopyPlugin( { | ||
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. Copies Verbum php files into |
||
patterns: [ | ||
{ | ||
from: './src/features/verbum-comments/index.php', | ||
to: './verbum-comments', | ||
}, | ||
{ | ||
from: './src/features/verbum-comments/assets', | ||
to: './verbum-comments/assets', | ||
}, | ||
], | ||
} ), | ||
], | ||
module: { | ||
strictExportPresence: true, | ||
rules: [ | ||
|
@@ -34,7 +58,10 @@ module.exports = { | |
} ), | ||
|
||
// Handle CSS. | ||
jetpackConfig.CssRule(), | ||
jetpackConfig.CssRule( { | ||
extensions: [ 'css', 'sass', 'scss' ], | ||
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. Handles scss conversion to css |
||
extraLoaders: [ 'sass-loader' ], | ||
} ), | ||
|
||
// Handle images. | ||
jetpackConfig.FileRule(), | ||
|
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.
Converts JSX to react function calls.