@plaudit/webpack-extensions 1.0.3 → 1.0.4
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.
|
@@ -8,7 +8,7 @@ const webpack_sources_1 = require("webpack-sources");
|
|
|
8
8
|
class BlockJSONStyleRemappingPlugin {
|
|
9
9
|
apply(compiler) {
|
|
10
10
|
compiler.hooks.compilation.tap("BlockJSONStyleRemappingPlugin", compilation => {
|
|
11
|
-
compilation.hooks.
|
|
11
|
+
compilation.hooks.afterProcessAssets.tap("BlockJSONStyleRemappingPlugin_ProcessAssets", compilationAssets => {
|
|
12
12
|
const stats = compilation.getStats().toJson({
|
|
13
13
|
hash: true,
|
|
14
14
|
publicPath: true,
|
|
@@ -23,6 +23,7 @@ class BlockJSONStyleRemappingPlugin {
|
|
|
23
23
|
const assetSourceFiles = new Map(stats.assets?.map(asset => [asset.name, asset.info?.sourceFilename])
|
|
24
24
|
.filter((v) => v[0] !== undefined && v[1] !== undefined) ?? []);
|
|
25
25
|
const singleFileChunkToOutputName = new Map(stats.assets?.filter((asset) => asset.chunks?.length === 1)
|
|
26
|
+
.filter(asset => !asset.name.endsWith('.asset.php'))
|
|
26
27
|
.map(asset => [toNumericChunkId(asset.chunks[0]), asset.name]) ?? []);
|
|
27
28
|
const singleFileInputToOutputName = new Map(stats.modules?.map(module => {
|
|
28
29
|
if (module.nameForCondition !== undefined && module.chunks?.length === 1) {
|
|
@@ -129,7 +129,7 @@ function default_1(config, webpackConfig = require("@wordpress/scripts/config/we
|
|
|
129
129
|
syntactic: true,
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
|
-
}), new webpack_remove_empty_scripts_1.default({ stage: webpack_remove_empty_scripts_1.default.STAGE_AFTER_PROCESS_PLUGINS }), new BlockJSONStyleRemappingPlugin_1.default(), new AdditionalDependencyInjectorPlugin_1.default());
|
|
132
|
+
}), new webpack_remove_empty_scripts_1.default({ stage: webpack_remove_empty_scripts_1.default.STAGE_AFTER_PROCESS_PLUGINS, extensions: ['css', 'scss', 'sass', 'less', 'styl', 'pcss'] }), new BlockJSONStyleRemappingPlugin_1.default(), new AdditionalDependencyInjectorPlugin_1.default());
|
|
133
133
|
return Object.entries(config.src).map(([srcDir, dest]) => {
|
|
134
134
|
const srcRoot = node_path_1.default.join(process.cwd(), srcDir);
|
|
135
135
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudit/webpack-extensions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepublishOnly": "rm -rf build && mkdir build && tsc",
|
|
6
6
|
"build": "tsc",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"./wordpress-scripts-wrapper": "./build/wordpress-scripts-wrapper.js"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/node": "^18.
|
|
16
|
+
"@types/node": "^18.16.1",
|
|
17
17
|
"@types/webpack": "^5.28.1",
|
|
18
18
|
"@types/webpack-sources": "^3.2.0",
|
|
19
19
|
"postcss-load-config": "^4.0.1",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"@plaudit/postcss-silent-extend": "^3.0.0",
|
|
27
27
|
"@plaudit/postcss-strip-units": "^3.0.0",
|
|
28
28
|
"@plaudit/postcss-variables": "^1.0.0",
|
|
29
|
-
"@wordpress/scripts": "^26.
|
|
29
|
+
"@wordpress/scripts": "^26.3.0",
|
|
30
30
|
"autoprefixer": "^10.4.14",
|
|
31
31
|
"clean-webpack-plugin": "^4.0.0",
|
|
32
32
|
"copy-webpack-plugin": "^11.0.0",
|
|
33
33
|
"cssnano": "^6.0.0",
|
|
34
|
-
"eslint": "^8.
|
|
35
|
-
"eslint-plugin-jsdoc": "^43.
|
|
34
|
+
"eslint": "^8.39.0",
|
|
35
|
+
"eslint-plugin-jsdoc": "^43.1.1",
|
|
36
36
|
"fork-ts-checker-webpack-plugin": "^8.0.0",
|
|
37
37
|
"postcss": "^8.4.23",
|
|
38
38
|
"postcss-calc": "^8.2.4",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"postcss-short-spacing": "^4.0.0",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
53
|
"react-dom": "^18.2.0",
|
|
54
|
-
"webpack": "^5.
|
|
54
|
+
"webpack": "^5.81.0",
|
|
55
55
|
"webpack-remove-empty-scripts": "^1.0.3",
|
|
56
56
|
"webpack-sources": "^3.2.3"
|
|
57
57
|
},
|
|
58
58
|
"resolutions": {
|
|
59
|
-
"eslint-plugin-jsdoc": "^43.
|
|
59
|
+
"eslint-plugin-jsdoc": "^43.1.1"
|
|
60
60
|
}
|
|
61
61
|
}
|