@davidsneighbour/webpack-config 2024.3.28 → 2024.3.30

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.
Files changed (2) hide show
  1. package/index.js +10 -7
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -2,12 +2,15 @@ import { resolve as _resolve, join } from "node:path";
2
2
  import TerserPlugin from "terser-webpack-plugin";
3
3
 
4
4
  // noinspection JSUnresolvedVariable
5
- export default (/** @type {{ production: any; }} */ env) =>
6
- // noinspection JSUnresolvedVariable
7
- ({
8
- mode: env.production ? "production" : "development",
9
- devtool: env.production ? "source-map" : "inline-source-map",
5
+ export default {
6
+ mode: process.env.production ? "production" : "development",
7
+ devtool: process.env.production ? "source-map" : "inline-source-map",
8
+
9
+ output: {
10
+ path: join(__dirname, 'static/assets/dist'),
11
+ },
10
12
 
13
+ watch: true,
11
14
  watchOptions: {
12
15
  aggregateTimeout: 200,
13
16
  poll: 1000,
@@ -24,7 +27,7 @@ export default (/** @type {{ production: any; }} */ env) =>
24
27
  },
25
28
 
26
29
  optimization: {
27
- minimize: !!env.production,
30
+ minimize: !!process.env.production,
28
31
  minimizer: [
29
32
  new TerserPlugin({
30
33
  terserOptions: {
@@ -81,4 +84,4 @@ export default (/** @type {{ production: any; }} */ env) =>
81
84
  resolve: {
82
85
  extensions: ['.tsx', '.ts', '.js'],
83
86
  },
84
- });
87
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@davidsneighbour/webpack-config",
3
3
  "description": "Webpack configuration for use in @davidsneighbour projects.",
4
- "version": "2024.3.28",
4
+ "version": "2024.3.30",
5
5
  "license": "MIT",
6
6
  "repository": "davidsneighbour/configurations",
7
7
  "author": "Patrick Kollitsch <patrick@davids-neighbour.com> (https://davids-neighbour.com)",
@@ -30,5 +30,5 @@
30
30
  "node": ">=22.1.0",
31
31
  "npm": ">=10.8.0"
32
32
  },
33
- "gitHead": "adf8ad85964456e080988460f118cb9fd50ecd38"
33
+ "gitHead": "9e84c20163413c9f71b76e4136e4de800986c9df"
34
34
  }