@stanlemon/webdev 0.1.201 → 0.2.1
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/eslint.config.js +1 -0
- package/jest.config.js +5 -6
- package/jest.setup.js +1 -1
- package/package.json +7 -5
- package/tsconfig.json +2 -2
- package/webpack.config.js +8 -9
- package/.eslintignore +0 -1
- package/.eslintrc.json +0 -5
package/eslint.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@stanlemon/eslint-config";
|
package/jest.config.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const babelOptions = require("./.babelrc.json");
|
|
1
|
+
import path from "path";
|
|
2
|
+
import babelOptions from "./.babelrc.json" assert { type: "json" };
|
|
4
3
|
|
|
5
4
|
// Disable using esmodules everywhere
|
|
6
5
|
babelOptions.presets.find(
|
|
@@ -19,9 +18,9 @@ const esModules = [
|
|
|
19
18
|
"@stanlemon/server-with-auth",
|
|
20
19
|
].join("|");
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
export default {
|
|
23
22
|
verbose: true,
|
|
24
|
-
setupFilesAfterEnv: [path.resolve(
|
|
23
|
+
setupFilesAfterEnv: [path.resolve(import.meta.dirname, "./jest.setup.js")],
|
|
25
24
|
testEnvironment: "jsdom",
|
|
26
25
|
transform: {
|
|
27
26
|
"^.+\\.(js|jsx|ts|tsx)?$": ["babel-jest", babelOptions],
|
|
@@ -32,7 +31,7 @@ module.exports = {
|
|
|
32
31
|
moduleNameMapper: {
|
|
33
32
|
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
|
|
34
33
|
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
|
|
35
|
-
uuid:
|
|
34
|
+
"^uuid$": "uuid",
|
|
36
35
|
},
|
|
37
36
|
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
|
|
38
37
|
coverageDirectory: "coverage",
|
package/jest.setup.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stanlemon/webdev",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "My typical web development setup, but without all the copy and paste.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=20.0"
|
|
15
15
|
},
|
|
16
|
-
"type": "
|
|
16
|
+
"type": "module",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "WEBDEV_ENTRY=./example.tsx webpack build",
|
|
19
19
|
"lint": "eslint .",
|
|
20
|
-
"lint:fix": "eslint --fix ."
|
|
20
|
+
"lint:fix": "eslint --fix .",
|
|
21
|
+
"test": "jest",
|
|
22
|
+
"tsc": "tsc"
|
|
21
23
|
},
|
|
22
24
|
"dependencies": {
|
|
23
25
|
"@babel/cli": "^7.25.6",
|
|
@@ -42,14 +44,14 @@
|
|
|
42
44
|
"react-refresh": "^0.14.2",
|
|
43
45
|
"style-loader": "^4.0.0",
|
|
44
46
|
"typescript": "^5.6.2",
|
|
45
|
-
"webpack": "^5.
|
|
47
|
+
"webpack": "^5.95.0",
|
|
46
48
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
47
49
|
"webpack-cli": "^5.1.4",
|
|
48
50
|
"webpack-dev-server": "^5.1.0"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
53
|
"@types/jest": "^29.5.13",
|
|
52
|
-
"@types/react": "^18.3.
|
|
54
|
+
"@types/react": "^18.3.10",
|
|
53
55
|
"@types/react-dom": "^18.3.0",
|
|
54
56
|
"@types/webpack": "^5.28.5",
|
|
55
57
|
"@types/webpack-env": "^1.18.5",
|
package/tsconfig.json
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"forceConsistentCasingInFileNames": true,
|
|
16
16
|
"noFallthroughCasesInSwitch": true,
|
|
17
17
|
"noImplicitAny": true,
|
|
18
|
-
"module": "
|
|
19
|
-
"moduleResolution": "
|
|
18
|
+
"module": "es2015",
|
|
19
|
+
"moduleResolution": "bundler",
|
|
20
20
|
"resolveJsonModule": true,
|
|
21
21
|
"isolatedModules": true,
|
|
22
22
|
"jsx": "react-jsx"
|
package/webpack.config.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import path from "path";
|
|
2
|
+
import { existsSync } from "fs";
|
|
3
|
+
import webpack from "webpack";
|
|
4
|
+
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
5
|
+
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
6
|
+
import { config } from "dotenv";
|
|
7
|
+
import babelOptions from "./.babelrc.json" assert { type: "json" };
|
|
7
8
|
|
|
8
9
|
config();
|
|
9
10
|
|
|
10
|
-
const babelOptions = require("./.babelrc.json");
|
|
11
|
-
|
|
12
11
|
function getWebdevEntry() {
|
|
13
12
|
if (process.env.WEBDEV_ENTRY) {
|
|
14
13
|
return process.env.WEBDEV_ENTRY;
|
|
@@ -48,7 +47,7 @@ const proxy = WEBDEV_PROXY.split(";")
|
|
|
48
47
|
|
|
49
48
|
const isDevelopment = NODE_ENV !== "production";
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
export default {
|
|
52
51
|
mode: isDevelopment ? "development" : "production",
|
|
53
52
|
entry: WEBDEV_ENTRY.split(";"),
|
|
54
53
|
output: {
|
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dist/**
|