piral-cli-webpack5 0.15.3-beta.4955 → 0.15.3-beta.4975

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.
Files changed (2) hide show
  1. package/extend-config.js +7 -2
  2. package/package.json +3 -3
package/extend-config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  function changePlugin(config, classRef, cb) {
2
- config.module.plugins = config.module.plugins
2
+ config.plugins = config.plugins
3
3
  .map((plugin) => {
4
4
  if (plugin instanceof classRef) {
5
5
  if (typeof cb === 'function') {
@@ -154,7 +154,12 @@ module.exports = function (override) {
154
154
  }
155
155
 
156
156
  if ('rules' in override && Array.isArray(override.rules)) {
157
- config.module.rules.unshift(...override.rules);
157
+ for (const rule of config.module.rules) {
158
+ if (Array.isArray(rule.oneOf)) {
159
+ rule.oneOf.unshift(...override.rules);
160
+ break;
161
+ }
162
+ }
158
163
  }
159
164
 
160
165
  if ('updatePlugins' in override && Array.isArray(override.updatePlugins)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-cli-webpack5",
3
- "version": "0.15.3-beta.4955",
3
+ "version": "0.15.3-beta.4975",
4
4
  "description": "Provides debug and build capabilities for pilets and Piral instances using Webpack v5.",
5
5
  "keywords": [
6
6
  "piral-cli",
@@ -49,7 +49,7 @@
49
49
  "@types/node": "^13.9.0",
50
50
  "@types/terser-webpack-plugin": "^5.0.0",
51
51
  "@types/yargs": "^15.0.4",
52
- "piral-cli": "0.15.3-beta.4955",
52
+ "piral-cli": "0.15.3-beta.4975",
53
53
  "strip-ansi": "^3.0.0"
54
54
  },
55
55
  "dependencies": {
@@ -76,5 +76,5 @@
76
76
  "ts-loader": "^8.0.6",
77
77
  "webpack": "^5.1.3"
78
78
  },
79
- "gitHead": "598563720dff2995e2ccc4acb07167554ce788d9"
79
+ "gitHead": "5cf09cee48aa723ebe3fa9e48a98ff118f3cb6dc"
80
80
  }