@studyportals/webpack-helper 3.0.5-beta.3 → 3.1.0-beta.0

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.5-beta.3",
3
+ "version": "3.1.0-beta.0",
4
4
  "description": "A collection of standard configurations and helpers for webpack.",
5
5
  "main": "src/main.js",
6
6
  "scripts": {
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DevelopmentConfig = void 0;
4
3
  exports.DevelopmentConfig = {
5
4
  optimization: {
6
5
  minimize: false
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductionConfig = void 0;
4
3
  const webpack = require('webpack');
5
4
  const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
6
5
  const DllAvailabilityTracker = require('@studyportals/dll-availability-tracker');
package/src/enums/mode.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Mode = void 0;
4
3
  var Mode;
5
4
  (function (Mode) {
6
5
  Mode["DEVELOPMENT"] = "development";
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Preset = void 0;
4
3
  var Preset;
5
4
  (function (Preset) {
6
5
  Preset["VUE_TYPESCRIPT"] = "vue-typescript";
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConfigurationFactory = void 0;
4
3
  const configuration_1 = require("../model/configuration");
5
4
  class ConfigurationFactory {
6
5
  create(options) {
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Configuration = void 0;
4
3
  const entry_1 = require("./entry");
5
4
  const output_1 = require("./output");
6
5
  const plugins_1 = require("./plugins");
@@ -33,6 +32,7 @@ class Configuration {
33
32
  [mode_1.Mode.DEVELOPMENT]: merge([configDev, development_config_1.DevelopmentConfig]) || development_config_1.DevelopmentConfig,
34
33
  [mode_1.Mode.PRODUCTION]: merge([configPrd, production_config_1.ProductionConfig(this.bob)]) || production_config_1.ProductionConfig(this.bob)
35
34
  };
35
+ this.fileName = options.output.fileName || "[name]";
36
36
  }
37
37
  get(mode) {
38
38
  this.detectPresets(mode);
@@ -112,12 +112,13 @@ class Configuration {
112
112
  return dependencies;
113
113
  }
114
114
  getCSSFileName() {
115
+ const fileName = this.fileName || `style`;
115
116
  if (this.hash === false
116
117
  || typeof this.hash.css !== 'undefined'
117
118
  && this.hash.css === false) {
118
- return 'style.css';
119
+ return `${fileName}.css`;
119
120
  }
120
- return 'style.[fullhash].css';
121
+ return `${fileName}.[fullhash].css`;
121
122
  }
122
123
  }
123
124
  exports.Configuration = Configuration;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Entry = void 0;
4
3
  class Entry {
5
4
  constructor(entry) {
6
5
  this.entry = entry;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Module = void 0;
4
3
  const { merge } = require('webpack-merge');
5
4
  class Module {
6
5
  constructor(module = {}) {
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Output = void 0;
4
3
  class Output {
5
4
  constructor(outputConfig) {
6
5
  this.path = outputConfig.path;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Plugins = void 0;
4
3
  class Plugins {
5
4
  constructor(plugins = []) {
6
5
  this.plugins = [];
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JavascriptPreset = void 0;
4
3
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
4
  class JavascriptPreset {
6
5
  getPlugins(filename) {
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeScriptPreset = void 0;
4
3
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
4
  class TypeScriptPreset {
6
5
  getPlugins(filename) {
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VueTypescriptNoCodeSplittingPreset = void 0;
4
3
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
4
  const VueLoaderPlugin = require('vue-loader').VueLoaderPlugin;
6
5
  const vue_typescript_preset_1 = require("./vue-typescript.preset");
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VueTypeScriptPreset = void 0;
4
3
  const mode_1 = require("../enums/mode");
5
4
  const webpack = require("webpack");
6
5
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');