@studyportals/webpack-helper 3.0.0-beta.0 → 3.0.0-beta.4

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.0",
3
+ "version": "3.0.0-beta.4",
4
4
  "description": "A collection of standard configurations and helpers for webpack.",
5
5
  "main": "src/main.js",
6
6
  "scripts": {
@@ -31,11 +31,11 @@
31
31
  "@studyportals/bob-manifest-generator": "^2.3.1",
32
32
  "@studyportals/browserslist-config": "^1.2.0",
33
33
  "@studyportals/dll-availability-tracker": "^1.0.2",
34
- "@studyportals/vue-config": "4.0.0-beta.0",
34
+ "@studyportals/vue-config": "4.0.0-beta.2",
35
35
  "babel-loader": "^8.2.3",
36
36
  "css-loader": "^6.5.1",
37
37
  "file-loader": "^6.2.0",
38
- "mini-css-extract-plugin": "^2.4.5",
38
+ "mini-css-extract-plugin": "^2.5.3",
39
39
  "node-sass": "^7.0.1",
40
40
  "optimize-css-assets-webpack-plugin": "^5.0.8",
41
41
  "path": "^0.12.7",
@@ -38,10 +38,9 @@ exports.ProductionConfig = (bobConfig) => {
38
38
  optimization: {
39
39
  minimize: true,
40
40
  minimizer: [
41
- (compiler) => {
41
+ compiler => {
42
42
  const TerserPlugin = require('terser-webpack-plugin');
43
43
  new TerserPlugin({
44
- sourceMap: true,
45
44
  parallel: true,
46
45
  extractComments: false,
47
46
  terserOptions: {
@@ -51,7 +50,8 @@ exports.ProductionConfig = (bobConfig) => {
51
50
  compress: {
52
51
  drop_console: true,
53
52
  passes: 5
54
- }
53
+ },
54
+ sourceMap: true
55
55
  }
56
56
  }).apply(compiler);
57
57
  }
@@ -33,8 +33,6 @@ class Configuration {
33
33
  this.detectPresets();
34
34
  }
35
35
  get(mode) {
36
- let adjustedMode = mode;
37
- adjustedMode = adjustedMode.WEBPACK_SERVE ? "development" : "production";
38
36
  return merge({
39
37
  entry: this.entry.getEntry(),
40
38
  output: this.output.getOutput(),
@@ -50,7 +48,7 @@ class Configuration {
50
48
  minimize: false
51
49
  },
52
50
  devtool: 'source-map'
53
- }, this.getBobConfig(), this.commonConfig, this.getEnvironmentSpecificConfig(adjustedMode), { mode: adjustedMode });
51
+ }, this.getBobConfig(), this.commonConfig, this.getEnvironmentSpecificConfig(mode), { mode });
54
52
  }
55
53
  detectPresets() {
56
54
  switch (this.preset) {
@@ -113,7 +111,7 @@ class Configuration {
113
111
  && this.hash.css === false) {
114
112
  return 'style.css';
115
113
  }
116
- return 'style.[hash].css';
114
+ return 'style.[fullhash].css';
117
115
  }
118
116
  }
119
117
  exports.Configuration = Configuration;
@@ -27,7 +27,7 @@ class Output {
27
27
  return output;
28
28
  }
29
29
  getFileName() {
30
- let fileName = this.addHash === true ? `${this.fileName}.[hash].js` : `${this.fileName}.js`;
30
+ let fileName = this.addHash === true ? `${this.fileName}.[fullhash].js` : `${this.fileName}.js`;
31
31
  return fileName;
32
32
  }
33
33
  shouldAddHash(hashConfig) {
@@ -42,7 +42,7 @@ class TypeScriptPreset {
42
42
  test: /\.(png|jpg|gif|svg)$/,
43
43
  loader: 'file-loader',
44
44
  options: {
45
- name: '[name].[ext]?[hash]'
45
+ name: '[name].[ext]?[fullhash]'
46
46
  }
47
47
  }
48
48
  ]
@@ -8,7 +8,7 @@ class VueTypeScriptPreset {
8
8
  getPlugins(filename) {
9
9
  return [
10
10
  new webpack.DllReferencePlugin({
11
- manifest: require("@studyportals/vue-config/dist/library.json")
11
+ manifest: require("@studyportals/vue-config/dist/vue3_library.json")
12
12
  }),
13
13
  new MiniCssExtractPlugin({
14
14
  filename
@@ -64,7 +64,7 @@ class VueTypeScriptPreset {
64
64
  test: /\.(png|jpg|gif|svg)$/,
65
65
  loader: 'file-loader',
66
66
  options: {
67
- name: '[name].[ext]?[hash]'
67
+ name: '[name].[ext]?[fullhash]'
68
68
  }
69
69
  },
70
70
  ]