piral-cli-webpack5 0.14.20 → 0.14.21

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 +20 -0
  2. package/package.json +3 -3
package/extend-config.js CHANGED
@@ -66,6 +66,26 @@ function changeLoaderOptions(config, name, options) {
66
66
  });
67
67
  }
68
68
 
69
+ /**
70
+ * Use this function to create a function to return from your webpack
71
+ * configuration module. The created function can be used to conveniently
72
+ * override and etend the original configuration.
73
+ * @typedef OverrideOptions
74
+ * @property {any=} tsLoaderOptions The new options for the ts-loader
75
+ * @property {any=} babelLoaderOptions The new options for the babel-loader
76
+ * @property {any=} cssLoaderOptions The new options for the css-loader
77
+ * @property {any=} sassLoaderOptions The new options for the sass-loader
78
+ * @property {boolean=} checkTypes Determines the value of the transpileOnly option in ts-loader
79
+ * @property {boolean=} noPresets Determines if presets should be set to undefined in babel-loader
80
+ * @property {Array<{ name: string, rule: any }>=} updateRules Overrides the rules determined by its loader name with the provided rule
81
+ * @property {Array<string>=} removeRules Removes the rules determined by its loader name
82
+ * @property {Array<any>=} rules Inserts the given rules in the beginning
83
+ * @property {Array<{ type: any, plugin: any }>=} updatePlugins Overrides the plugins determined by its class reference (instance) with the provided plugin
84
+ * @property {Array<any>=} removePlugins Removes the plugins determined by its class reference (instance)
85
+ * @property {Array<any>=} plugins Inserts the given plugins in the end
86
+ * @param {OverrideOptions} override
87
+ * @returns {(config: webpack.Configuration) => webpack.Configuration}
88
+ */
69
89
  module.exports = function (override) {
70
90
  return (config) => {
71
91
  if (override && typeof override === 'object') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-cli-webpack5",
3
- "version": "0.14.20",
3
+ "version": "0.14.21",
4
4
  "description": "Provides debug and build capabilities for pilets and Piral instances using Webpack v5.",
5
5
  "keywords": [
6
6
  "piral-cli",
@@ -48,7 +48,7 @@
48
48
  "@types/node": "^13.9.0",
49
49
  "@types/terser-webpack-plugin": "^5.0.0",
50
50
  "@types/yargs": "^15.0.4",
51
- "piral-cli": "^0.14.20",
51
+ "piral-cli": "^0.14.21",
52
52
  "strip-ansi": "^3.0.0",
53
53
  "typescript": "^4.0.2"
54
54
  },
@@ -76,5 +76,5 @@
76
76
  "ts-loader": "^8.0.6",
77
77
  "webpack": "^5.1.3"
78
78
  },
79
- "gitHead": "9a7775dbe470e2b10d31d40cfa9f286309b43ff9"
79
+ "gitHead": "28d12711859b01c425da9242f08b6a7270cc3686"
80
80
  }