wp-blank-scripts 3.0.0-beta.9 → 3.0.1-beta.0
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/README.md +3 -0
- package/config/.prettierrc.js +0 -1
- package/lib/buildProject.js +2 -1
- package/package.json +1 -1
- package/webpack.base.config.js +16 -1
- package/webpack.react.config.js +2 -1
package/README.md
CHANGED
package/config/.prettierrc.js
CHANGED
package/lib/buildProject.js
CHANGED
|
@@ -158,12 +158,13 @@ module.exports = async (envConfig = {}, buildOptions, failOnError = false) => {
|
|
|
158
158
|
const info = stats.toJson();
|
|
159
159
|
|
|
160
160
|
if (stats.hasWarnings()) {
|
|
161
|
+
console.log(info.warnings);
|
|
161
162
|
info.warnings.forEach((warning) => logger.warn(warning));
|
|
162
163
|
}
|
|
163
164
|
|
|
164
165
|
if (stats.hasErrors()) {
|
|
165
166
|
info.errors.forEach((error) => {
|
|
166
|
-
|
|
167
|
+
console.log(chalk.red(error));
|
|
167
168
|
});
|
|
168
169
|
|
|
169
170
|
logger.error('Build finished with errors');
|
package/package.json
CHANGED
package/webpack.base.config.js
CHANGED
|
@@ -112,6 +112,15 @@ function makeBaseConfig(options) {
|
|
|
112
112
|
{ from: 'wp-content', to: 'wp-content' },
|
|
113
113
|
];
|
|
114
114
|
|
|
115
|
+
// @TODO: temporary for development of blocks package
|
|
116
|
+
const includeBlocks = process.env.MASTER_BLOCKS;
|
|
117
|
+
const masterBlocks = [
|
|
118
|
+
{
|
|
119
|
+
from: path.join(__dirname, '../../vivo/vivo-master-blocks'),
|
|
120
|
+
to: path.join(themePath, 'inc', 'vivo-master-blocks'),
|
|
121
|
+
},
|
|
122
|
+
];
|
|
123
|
+
|
|
115
124
|
let customFiles = [];
|
|
116
125
|
if (typeof copyFiles === 'function') {
|
|
117
126
|
customFiles = copyFiles({
|
|
@@ -123,7 +132,13 @@ function makeBaseConfig(options) {
|
|
|
123
132
|
});
|
|
124
133
|
}
|
|
125
134
|
|
|
126
|
-
const filesToCopy = [
|
|
135
|
+
const filesToCopy = [
|
|
136
|
+
...sourceFiles,
|
|
137
|
+
...envFiles,
|
|
138
|
+
...wordpressFiles,
|
|
139
|
+
...customFiles,
|
|
140
|
+
...(includeBlocks ? masterBlocks : []),
|
|
141
|
+
];
|
|
127
142
|
|
|
128
143
|
// Admin entries
|
|
129
144
|
const adminScripts = glob.sync(path.join(sourcePath, 'assets', 'admin', 'js', '*.js'));
|
package/webpack.react.config.js
CHANGED
|
@@ -55,6 +55,7 @@ function makeReactWebpackConfig(options) {
|
|
|
55
55
|
use: {
|
|
56
56
|
loader: 'swc-loader',
|
|
57
57
|
options: {
|
|
58
|
+
sourceMap: true,
|
|
58
59
|
jsc: {
|
|
59
60
|
parser: {
|
|
60
61
|
jsx: true,
|
|
@@ -209,7 +210,7 @@ function makeReactWebpackConfig(options) {
|
|
|
209
210
|
};
|
|
210
211
|
if (!isProd) {
|
|
211
212
|
config.plugins.push(new webpack.HotModuleReplacementPlugin());
|
|
212
|
-
config.plugins.push(new ReactRefreshWebpackPlugin());
|
|
213
|
+
config.plugins.push(new ReactRefreshWebpackPlugin({ overlay: false }));
|
|
213
214
|
}
|
|
214
215
|
|
|
215
216
|
return config;
|