@studyportals/webpack-helper 3.0.0-beta.20 → 3.0.0-beta.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/webpack-helper",
3
- "version": "3.0.0-beta.20",
3
+ "version": "3.0.0-beta.23",
4
4
  "description": "A collection of standard configurations and helpers for webpack.",
5
5
  "main": "src/main.js",
6
6
  "scripts": {
@@ -31,7 +31,7 @@
31
31
  "@studyportals/bob-manifest-generator": "^3.0.0-beta.10",
32
32
  "@studyportals/browserslist-config": "^1.2.0",
33
33
  "@studyportals/dll-availability-tracker": "^2.0.0-beta.3",
34
- "@studyportals/vue-config": "4.0.0-beta.6",
34
+ "@studyportals/vue-config": "^4.0.0-beta.7",
35
35
  "babel-loader": "^8.2.3",
36
36
  "css-loader": "^6.5.1",
37
37
  "file-loader": "^6.2.0",
@@ -32,9 +32,9 @@ class Configuration {
32
32
  [mode_1.Mode.DEVELOPMENT]: merge([configDev, development_config_1.DevelopmentConfig]) || development_config_1.DevelopmentConfig,
33
33
  [mode_1.Mode.PRODUCTION]: merge([configPrd, production_config_1.ProductionConfig(this.bob)]) || production_config_1.ProductionConfig(this.bob)
34
34
  };
35
- this.detectPresets();
36
35
  }
37
36
  get(mode) {
37
+ this.detectPresets(mode);
38
38
  return merge({
39
39
  entry: this.entry.getEntry(),
40
40
  output: this.output.getOutput(),
@@ -52,10 +52,10 @@ class Configuration {
52
52
  devtool: 'source-map'
53
53
  }, this.getBobConfig(), this.commonConfig, this.getEnvironmentSpecificConfig(mode), { mode });
54
54
  }
55
- detectPresets() {
55
+ detectPresets(mode) {
56
56
  switch (this.preset) {
57
57
  case preset_1.Preset.VUE_TYPESCRIPT:
58
- this.injectPreset(new vue_typescript_preset_1.VueTypeScriptPreset());
58
+ this.injectPreset(new vue_typescript_preset_1.VueTypeScriptPreset(mode));
59
59
  break;
60
60
  case preset_1.Preset.TYPESCRIPT:
61
61
  this.injectPreset(new typescript_preset_1.TypeScriptPreset());
@@ -1,14 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VueTypeScriptPreset = void 0;
4
+ const mode_1 = require("../enums/mode");
4
5
  const webpack = require("webpack");
5
6
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
6
7
  const VueLoaderPlugin = require('vue-loader').VueLoaderPlugin;
7
8
  class VueTypeScriptPreset {
9
+ constructor(mode) {
10
+ this.mode = mode;
11
+ }
8
12
  getPlugins(filename) {
9
13
  return [
10
14
  new webpack.DllReferencePlugin({
11
- manifest: require("@studyportals/vue-config/dist/vue3_library.min.json")
15
+ manifest: require(`@studyportals/vue-config/dist/vue3_library${this.mode === mode_1.Mode.PRODUCTION ? '.min' : ''}.json`)
12
16
  }),
13
17
  new MiniCssExtractPlugin({
14
18
  filename