@stanlemon/webdev 0.1.164 → 0.1.166

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/jest.config.js CHANGED
@@ -8,11 +8,13 @@ babelOptions.presets.find(
8
8
  )[1].modules = "auto";
9
9
 
10
10
  // These are packages we know ship with esmodules and need to be transformed
11
+ // TODO: Add an easy way to supply one's own esModules to be transformed by Jest
11
12
  const esModules = [
12
13
  "uuid",
13
14
  "lowdb",
14
- "steno",
15
+ "steno", // Used by lowdb
15
16
  "lodash-es",
17
+ "wouter", // Used by @atanlemon/app-template
16
18
  "@stanlemon/server",
17
19
  "@stanlemon/server-with-auth",
18
20
  ].join("|");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stanlemon/webdev",
3
- "version": "0.1.164",
3
+ "version": "0.1.166",
4
4
  "description": "My typical web development setup, but without all the copy and paste.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -31,7 +31,7 @@
31
31
  "@stanlemon/eslint-config": "*",
32
32
  "@testing-library/jest-dom": "^6.4.2",
33
33
  "@types/jest": "^29.5.12",
34
- "@types/react": "^18.2.55",
34
+ "@types/react": "^18.2.56",
35
35
  "@types/react-dom": "^18.2.19",
36
36
  "@types/webpack": "^5.28.5",
37
37
  "@types/webpack-env": "^1.18.4",
@@ -49,7 +49,7 @@
49
49
  "react-refresh": "^0.14.0",
50
50
  "style-loader": "^3.3.4",
51
51
  "typescript": "^5.3.3",
52
- "webpack": "^5.90.1",
52
+ "webpack": "^5.90.2",
53
53
  "webpack-bundle-analyzer": "^4.10.1",
54
54
  "webpack-cli": "^5.1.4",
55
55
  "webpack-dev-server": "^5.0.2"
package/webpack.config.js CHANGED
@@ -11,8 +11,20 @@ config();
11
11
 
12
12
  const babelOptions = require("./.babelrc.json");
13
13
 
14
+ function getWebdevEntry() {
15
+ if (process.env.WEBDEV_ENTRY) {
16
+ return process.env.WEBDEV_ENTRY;
17
+ } else if (existsSync("./src/index.tsx")) {
18
+ return "./src/index.tsx";
19
+ } else if (existsSync("./src/index.ts")) {
20
+ return "./src/index.ts";
21
+ } else {
22
+ return "./src/index.js";
23
+ }
24
+ }
25
+
14
26
  // Entry points, which can be separated by a semi-colon
15
- const WEBDEV_ENTRY = process.env.WEBDEV_ENTRY ?? "./src/index.tsx";
27
+ const WEBDEV_ENTRY = getWebdevEntry();
16
28
  // HTML pages to create, which can be separated by a semi-colon
17
29
  // If you prefix a page with a ! it will disable script injection
18
30
  // The filename from the supplied path is used as the filename of the resulting file