@plaudit/webpack-extensions 2.0.0-beta.4 → 2.0.0-beta.5

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.
@@ -85,8 +85,7 @@ function default_1(config, webpackConfig = require("@wordpress/scripts/config/we
85
85
  }
86
86
  }
87
87
  }
88
- const postcssLoader = require.resolve('postcss-loader');
89
- if (postcssLoader && webpackConfig.module?.rules) {
88
+ if (webpackConfig.module?.rules) {
90
89
  // Options: calc
91
90
  const calcOptions = { precision: 4, mediaQueries: true, selectors: true };
92
91
  // Options: autoprefixerOptions
@@ -123,7 +122,7 @@ function default_1(config, webpackConfig = require("@wordpress/scripts/config/we
123
122
  if (useItem.options["sourceMap"] === false) {
124
123
  useItem.options["sourceMap"] = true;
125
124
  }
126
- if (useItem.loader === postcssLoader) {
125
+ if (useItem.loader?.includes('postcss-loader')) {
127
126
  if (useItem.options["postcssOptions"]) {
128
127
  useItem.options["postcssOptions"] = { ...useItem.options["postcssOptions"], ...postcssConfig, sourceMap: true };
129
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaudit/webpack-extensions",
3
- "version": "2.0.0-beta.4",
3
+ "version": "2.0.0-beta.5",
4
4
  "scripts": {
5
5
  "prepublishOnly": "rm -rf build && mkdir build && tsc",
6
6
  "build": "tsc",
@@ -17,6 +17,7 @@
17
17
  "@types/webpack": "^5.28.1",
18
18
  "@types/webpack-sources": "^3.2.0",
19
19
  "postcss-load-config": "^4.0.1",
20
+ "postcss-loader": "^7.3.2",
20
21
  "ts-node": "^10.9.1",
21
22
  "typescript": "^5.1.3"
22
23
  },
@@ -35,7 +36,6 @@
35
36
  "fork-ts-checker-webpack-plugin": "^8.0.0",
36
37
  "postcss": "8.4.24",
37
38
  "postcss-calc": "8.0.0",
38
- "postcss-loader": "^6.2.1",
39
39
  "postcss-fallback": "^0.1.0",
40
40
  "postcss-functions": "4.0.2",
41
41
  "postcss-import": "14.0.2",