wp-blank-scripts 3.1.1 → 3.1.3
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/lib/buildProject.js +1 -2
- package/package.json +1 -1
- package/webpack.react.config.js +3 -3
package/lib/buildProject.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const chalk = require('chalk');
|
|
2
1
|
const fs = require('fs');
|
|
3
2
|
const webpack = require('webpack');
|
|
4
3
|
const { merge } = require('webpack-merge');
|
|
@@ -79,7 +78,7 @@ module.exports = async (envConfig = {}, buildOptions, failOnError = false) => {
|
|
|
79
78
|
webpackConfig = webpackConfig();
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
fs.
|
|
81
|
+
await fs.promises.rm('dist', { recursive: true, force: true });
|
|
83
82
|
|
|
84
83
|
const config = merge(...[baseConfig, envConfig, buildConfig, webpackConfig].filter(Boolean));
|
|
85
84
|
|
package/package.json
CHANGED
package/webpack.react.config.js
CHANGED
|
@@ -51,7 +51,7 @@ function makeReactWebpackConfig(options) {
|
|
|
51
51
|
rules: [
|
|
52
52
|
{
|
|
53
53
|
test: /.*\.(glb|gltf|bin)$/i,
|
|
54
|
-
type: 'asset/resource'
|
|
54
|
+
type: 'asset/resource',
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
test: /\.[jt]sx?$/,
|
|
@@ -173,8 +173,8 @@ function makeReactWebpackConfig(options) {
|
|
|
173
173
|
excludeChunks: ['adminScripts', 'admin.style'],
|
|
174
174
|
}),
|
|
175
175
|
new MiniCssExtractPlugin({
|
|
176
|
-
filename({
|
|
177
|
-
if (name === 'admin.style') {
|
|
176
|
+
filename({ chunk }) {
|
|
177
|
+
if (chunk.name === 'admin.style') {
|
|
178
178
|
return path.join(themeDir, 'assets', 'css', 'admin.style.css');
|
|
179
179
|
}
|
|
180
180
|
|