wp-blank-scripts 4.0.0-dev-0 → 4.0.0-dev-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/webpack.base.config.js +2 -2
- package/webpack.wp.config.js +3 -3
package/package.json
CHANGED
package/webpack.base.config.js
CHANGED
|
@@ -184,11 +184,11 @@ function makeBaseConfig(options) {
|
|
|
184
184
|
|
|
185
185
|
blockJsonFiles.forEach((file) => {
|
|
186
186
|
const content = JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
187
|
-
if (content.editorScript
|
|
187
|
+
if (content.editorScript) {
|
|
188
188
|
const editorScript = `${path.dirname(file)}/${content.editorScript}`;
|
|
189
189
|
blockJsonScripts.push(editorScript);
|
|
190
190
|
}
|
|
191
|
-
if (content.editorStyle
|
|
191
|
+
if (content.editorStyle) {
|
|
192
192
|
const editorStyle = `${path.dirname(file)}/${content.editorStyle}`;
|
|
193
193
|
blockJsonStyles.push(editorStyle);
|
|
194
194
|
}
|
package/webpack.wp.config.js
CHANGED
|
@@ -27,11 +27,11 @@ function makeWpWebpackConfig() {
|
|
|
27
27
|
|
|
28
28
|
blockJsonFiles.forEach((file) => {
|
|
29
29
|
const content = JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
30
|
-
if (content.viewScript
|
|
30
|
+
if (content.viewScript) {
|
|
31
31
|
const viewScript = `${path.dirname(file)}/${content.viewScript}`;
|
|
32
32
|
blockJsonScripts.push(viewScript);
|
|
33
33
|
}
|
|
34
|
-
if (content.style
|
|
34
|
+
if (content.style) {
|
|
35
35
|
const style = `${path.dirname(file)}/${content.style}`;
|
|
36
36
|
blockJsonStyles.push(style);
|
|
37
37
|
}
|
|
@@ -49,7 +49,7 @@ function makeWpWebpackConfig() {
|
|
|
49
49
|
return {
|
|
50
50
|
entry: {
|
|
51
51
|
main: [...blockJsonScripts, ...entryScript],
|
|
52
|
-
style: [...
|
|
52
|
+
style: [...blockJsonScripts, ...mainStyles],
|
|
53
53
|
},
|
|
54
54
|
plugins: [
|
|
55
55
|
new MiniCssExtractPlugin({
|