quidproquo-deploy-webpack 0.0.26 → 0.0.28

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.
@@ -3,6 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getWebpackConfig = void 0;
4
4
  const quidproquo_core_1 = require("quidproquo-core");
5
5
  const quidproquo_webserver_1 = require("quidproquo-webserver");
6
+ const getWebpackBuildMode = (qpqConfig) => {
7
+ const feature = quidproquo_core_1.qpqCoreUtils.getAppFeature(qpqConfig);
8
+ if (['development', 'production'].indexOf(feature) >= 0) {
9
+ return feature;
10
+ }
11
+ return 'production';
12
+ };
6
13
  const getWebpackConfig = (qpqConfig, buildPath, outputPrefix) => {
7
14
  const allSrcEntries = [
8
15
  ...quidproquo_core_1.qpqCoreUtils.getAllSrcEntries(qpqConfig),
@@ -10,7 +17,7 @@ const getWebpackConfig = (qpqConfig, buildPath, outputPrefix) => {
10
17
  ];
11
18
  return {
12
19
  entry: allSrcEntries.reduce((entry, path) => (Object.assign(Object.assign({}, entry), { [`./${outputPrefix}/${path}`]: `./${path}` })), {}),
13
- mode: 'production',
20
+ mode: getWebpackBuildMode(qpqConfig),
14
21
  // We should: sort out how to split the bundles and get it to work on aws
15
22
  // optimization: {
16
23
  // splitChunks: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-deploy-webpack",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "",
5
5
  "main": "./lib/webpack.config.js",
6
6
  "types": "./lib/webpack.config.d.js",