@studyportals/webpack-helper 3.2.4 → 3.2.6

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.
package/README.md CHANGED
@@ -143,6 +143,22 @@ entry: {
143
143
  }
144
144
  ```
145
145
 
146
+ ### Working with packaged components & libraries
147
+
148
+ When working with packaged components and libraries it is required to keep the bundle name in line with the major version of the package. This helps to prevent reference issues when multiple versions of a package load on a single page.
149
+
150
+ ```javascript
151
+ // version 1
152
+ entry: {
153
+ multiselect_v1: "./src/main.ts"
154
+ }
155
+
156
+ // version 2
157
+ entry: {
158
+ multiselect_v2: "./src/main.ts"
159
+ }
160
+ ```
161
+
146
162
  ### output **(required)**
147
163
 
148
164
  The output object has some options that define how your bundle will be output. It has the following properties:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/webpack-helper",
3
- "version": "3.2.4",
3
+ "version": "3.2.6",
4
4
  "description": "A collection of standard configurations and helpers for webpack.",
5
5
  "main": "src/main.js",
6
6
  "scripts": {
@@ -32,15 +32,25 @@
32
32
  "@studyportals/browserslist-config": "^1.2.0",
33
33
  "@studyportals/dll-availability-tracker": "^2.0.0",
34
34
  "@studyportals/vue-config": "^4.1.2",
35
+ "@types/jest": "^27.0.0",
36
+ "@vue/cli-plugin-babel": "^5.0.4",
37
+ "@vue/cli-plugin-unit-jest": "^5.0.4",
38
+ "@vue/test-utils": "^2.0.2",
39
+ "@vue/vue3-jest": "^27.0.0",
40
+ "babel-jest": "^27.5.1",
35
41
  "babel-loader": "^8.2.3",
36
42
  "css-loader": "^6.5.1",
37
43
  "file-loader": "^6.2.0",
38
44
  "mini-css-extract-plugin": "^2.5.3",
39
45
  "css-minimizer-webpack-plugin": "^4.0.0",
46
+ "jest": "^27.0.0",
47
+ "jest-junit": "^13.0.0",
48
+ "jest-serializer-vue": "^2.0.2",
40
49
  "path": "^0.12.7",
41
50
  "sass": "^1.49.7",
42
51
  "sass-loader": "^12.4.0",
43
52
  "terser-webpack-plugin": "^5.3.1",
53
+ "ts-jest": "^27.0.0",
44
54
  "ts-loader": "^9.2.6",
45
55
  "typescript": "^4.7.4",
46
56
  "vue-loader": "^16.2.0",
@@ -50,9 +60,6 @@
50
60
  },
51
61
  "devDependencies": {
52
62
  "@types/jest": "^27.4.0",
53
- "@types/node": "^17.0.14",
54
- "babel-jest": "^28.1.1",
55
- "jest": "^28.1.1",
56
- "ts-jest": "^28.0.5"
63
+ "@types/node": "^17.0.14"
57
64
  }
58
65
  }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DevelopmentConfig = void 0;
3
4
  exports.DevelopmentConfig = {
4
5
  optimization: {
5
6
  minimize: false
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductionConfig = void 0;
3
4
  const webpack = require('webpack');
4
5
  const cssMinimizerPlugin = require('css-minimizer-webpack-plugin');
5
6
  const DllAvailabilityTracker = require('@studyportals/dll-availability-tracker');
6
- exports.ProductionConfig = (bobConfig) => {
7
+ const ProductionConfig = (bobConfig) => {
7
8
  let dllDependencies = ['library'];
8
9
  if (bobConfig && bobConfig.hasOwnProperty('dllPackages')) {
9
10
  bobConfig.dllPackages.forEach((dependency) => dllDependencies.push(dependency.manifest.name));
@@ -58,3 +59,4 @@ exports.ProductionConfig = (bobConfig) => {
58
59
  }
59
60
  };
60
61
  };
62
+ exports.ProductionConfig = ProductionConfig;
package/src/enums/mode.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Mode = void 0;
3
4
  var Mode;
4
5
  (function (Mode) {
5
6
  Mode["DEVELOPMENT"] = "development";
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Preset = void 0;
3
4
  var Preset;
4
5
  (function (Preset) {
5
6
  Preset["VUE_TYPESCRIPT"] = "vue-typescript";
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigurationFactory = void 0;
3
4
  const configuration_1 = require("../model/configuration");
4
5
  class ConfigurationFactory {
5
6
  create(options) {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Configuration = void 0;
3
4
  const entry_1 = require("./entry");
4
5
  const output_1 = require("./output");
5
6
  const plugins_1 = require("./plugins");
@@ -30,7 +31,7 @@ class Configuration {
30
31
  const configPrd = options[mode_1.Mode.PRODUCTION] ? options[mode_1.Mode.PRODUCTION] : {};
31
32
  this.environmentSpecificConfig = {
32
33
  [mode_1.Mode.DEVELOPMENT]: merge([configDev, development_config_1.DevelopmentConfig]) || development_config_1.DevelopmentConfig,
33
- [mode_1.Mode.PRODUCTION]: merge([configPrd, production_config_1.ProductionConfig(this.bob)]) || production_config_1.ProductionConfig(this.bob)
34
+ [mode_1.Mode.PRODUCTION]: merge([configPrd, (0, production_config_1.ProductionConfig)(this.bob)]) || (0, production_config_1.ProductionConfig)(this.bob)
34
35
  };
35
36
  this.fileName = options.output.fileName || "[name]";
36
37
  }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Entry = void 0;
3
4
  class Entry {
4
5
  constructor(entry) {
5
6
  this.entry = entry;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Module = void 0;
3
4
  const { merge } = require('webpack-merge');
4
5
  class Module {
5
6
  constructor(module = {}) {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Output = void 0;
3
4
  class Output {
4
5
  constructor(outputConfig) {
5
6
  this.path = outputConfig.path;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Plugins = void 0;
3
4
  class Plugins {
4
5
  constructor(plugins = []) {
5
6
  this.plugins = [];
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JavascriptPreset = void 0;
3
4
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
5
  class JavascriptPreset {
5
6
  getPlugins(filename) {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypeScriptPreset = void 0;
3
4
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
5
  class TypeScriptPreset {
5
6
  getPlugins(filename) {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VueTypescriptNoCodeSplittingPreset = void 0;
3
4
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
5
  const VueLoaderPlugin = require('vue-loader').VueLoaderPlugin;
5
6
  const vue_typescript_preset_1 = require("./vue-typescript.preset");
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VueTypeScriptPreset = void 0;
3
4
  const mode_1 = require("../enums/mode");
4
5
  const webpack = require("webpack");
5
6
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');