@stanlemon/webdev 0.1.46 → 0.1.49

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/dist/index.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <title>Webpack App</title>
6
- <meta name="viewport" content="width=device-width, initial-scale=1"><script defer src="/runtime.517b8971955bd92adc2e.js"></script><script defer src="/react.02ba2699f9d8f6252a54.js"></script><script defer src="/vendors.0a67934fca487f9c9ec7.js"></script><script defer src="/main.7079c69ff92ecf2c5641.js"></script></head>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1"><script defer src="/runtime.9dafb62f464ccc27efd6.js"></script><script defer src="/react.02ba2699f9d8f6252a54.js"></script><script defer src="/vendors.0a67934fca487f9c9ec7.js"></script><script defer src="/main.870084e38c47836a0964.js"></script></head>
7
7
  <body>
8
8
  </body>
9
9
  </html>
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /*
3
+ * ATTENTION: An "eval-source-map" devtool has been used.
4
+ * This devtool is neither made for production nor for readable output files.
5
+ * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
6
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
7
+ * or disable the default devtool with "devtool: false".
8
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
9
+ */
10
+ (self["webpackChunk_stanlemon_webdev"] = self["webpackChunk_stanlemon_webdev"] || []).push([["main"],{
11
+
12
+ /***/ 6738:
13
+ /*!**************************!*\
14
+ !*** ./webpack.test.tsx ***!
15
+ \**************************/
16
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
+
18
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom/client */ 7029);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ 2322);\n/* provided dependency */ var __react_refresh_utils__ = __webpack_require__(/*! ../../node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js */ 5506);\n__webpack_require__.$Refresh$.runtime = __webpack_require__(/*! ../../node_modules/react-refresh/runtime.js */ 9139);\n\n\n\n\n\nfunction App({\n name\n}) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"div\", {\n children: [\"Hello \", name, \"!\"]\n });\n}\n\n_c = App;\nconst root = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_0__.createRoot)(document.body.appendChild(document.createElement(\"div\")));\nroot.render( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(App, {\n name: \"world\"\n}));\n\nvar _c;\n\n__webpack_require__.$Refresh$.register(_c, \"App\");\n\nconst $ReactRefreshModuleId$ = __webpack_require__.$Refresh$.moduleId;\nconst $ReactRefreshCurrentExports$ = __react_refresh_utils__.getModuleExports(\n\t$ReactRefreshModuleId$\n);\n\nfunction $ReactRefreshModuleRuntime$(exports) {\n\tif (false) {}\n}\n\nif (typeof Promise !== 'undefined' && $ReactRefreshCurrentExports$ instanceof Promise) {\n\t$ReactRefreshCurrentExports$.then($ReactRefreshModuleRuntime$);\n} else {\n\t$ReactRefreshModuleRuntime$($ReactRefreshCurrentExports$);\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjczOC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTs7OztBQU1BLFNBQVNDLEdBQVQsQ0FBYTtFQUFFQztBQUFGLENBQWIsRUFBOEI7RUFDNUIsb0JBQU87SUFBQSxxQkFBWUEsSUFBWjtFQUFBLEVBQVA7QUFDRDs7S0FGUUQ7QUFJVCxNQUFNRSxJQUFJLEdBQUdILDREQUFVLENBQ3JCSSxRQUFRLENBQUNDLElBQVQsQ0FBY0MsV0FBZCxDQUEwQkYsUUFBUSxDQUFDRyxhQUFULENBQXVCLEtBQXZCLENBQTFCLENBRHFCLENBQXZCO0FBR0FKLElBQUksQ0FBQ0ssTUFBTCxlQUFZLHVEQUFDLEdBQUQ7RUFBSyxJQUFJLEVBQUM7QUFBVixFQUFaIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQHN0YW5sZW1vbi93ZWJkZXYvLi93ZWJwYWNrLnRlc3QudHN4PzgzYmMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3JlYXRlUm9vdCB9IGZyb20gXCJyZWFjdC1kb20vY2xpZW50XCI7XG5cbnR5cGUgUHJvcHMgPSB7XG4gIG5hbWU6IHN0cmluZztcbn07XG5cbmZ1bmN0aW9uIEFwcCh7IG5hbWUgfTogUHJvcHMpIHtcbiAgcmV0dXJuIDxkaXY+SGVsbG8ge25hbWV9ITwvZGl2Pjtcbn1cblxuY29uc3Qgcm9vdCA9IGNyZWF0ZVJvb3QoXG4gIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKSlcbik7XG5yb290LnJlbmRlcig8QXBwIG5hbWU9XCJ3b3JsZFwiIC8+KTtcbiJdLCJuYW1lcyI6WyJjcmVhdGVSb290IiwiQXBwIiwibmFtZSIsInJvb3QiLCJkb2N1bWVudCIsImJvZHkiLCJhcHBlbmRDaGlsZCIsImNyZWF0ZUVsZW1lbnQiLCJyZW5kZXIiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///6738\n");
19
+
20
+ /***/ })
21
+
22
+ },
23
+ /******/ __webpack_require__ => { // webpackRuntimeModules
24
+ /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
25
+ /******/ __webpack_require__.O(0, ["react-node_modules_react-dom_client_js-node_modules_react-refresh_runtime_js-node_modules_rea-832849","vendors"], () => (__webpack_exec__(794), __webpack_exec__(6101), __webpack_exec__(6738)));
26
+ /******/ var __webpack_exports__ = __webpack_require__.O();
27
+ /******/ }
28
+ ]);
@@ -82,48 +82,6 @@
82
82
  /******/ };
83
83
  /******/ })();
84
84
  /******/
85
- /******/ /* webpack/runtime/create fake namespace object */
86
- /******/ (() => {
87
- /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
88
- /******/ var leafPrototypes;
89
- /******/ // create a fake namespace object
90
- /******/ // mode & 1: value is a module id, require it
91
- /******/ // mode & 2: merge all properties of value into the ns
92
- /******/ // mode & 4: return value when already ns object
93
- /******/ // mode & 16: return value when it's Promise-like
94
- /******/ // mode & 8|1: behave like require
95
- /******/ __webpack_require__.t = function(value, mode) {
96
- /******/ if(mode & 1) value = this(value);
97
- /******/ if(mode & 8) return value;
98
- /******/ if(typeof value === 'object' && value) {
99
- /******/ if((mode & 4) && value.__esModule) return value;
100
- /******/ if((mode & 16) && typeof value.then === 'function') return value;
101
- /******/ }
102
- /******/ var ns = Object.create(null);
103
- /******/ __webpack_require__.r(ns);
104
- /******/ var def = {};
105
- /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
106
- /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
107
- /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
108
- /******/ }
109
- /******/ def['default'] = () => (value);
110
- /******/ __webpack_require__.d(ns, def);
111
- /******/ return ns;
112
- /******/ };
113
- /******/ })();
114
- /******/
115
- /******/ /* webpack/runtime/define property getters */
116
- /******/ (() => {
117
- /******/ // define getter functions for harmony exports
118
- /******/ __webpack_require__.d = (exports, definition) => {
119
- /******/ for(var key in definition) {
120
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
121
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
122
- /******/ }
123
- /******/ }
124
- /******/ };
125
- /******/ })();
126
- /******/
127
85
  /******/ /* webpack/runtime/global */
128
86
  /******/ (() => {
129
87
  /******/ __webpack_require__.g = (function() {
package/jest.config.js CHANGED
@@ -1,12 +1,11 @@
1
- import path from "path";
2
- import { fileURLToPath } from "url";
3
- import { readFileSync } from "fs";
1
+ const path = require("path");
4
2
 
5
- const babelOptions = JSON.parse(
6
- readFileSync(new URL("./.babelrc.json", import.meta.url))
7
- );
3
+ const babelOptions = require("./.babelrc.json");
8
4
 
9
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
+ // Disable using esmodules everywhere
6
+ babelOptions.presets.find(
7
+ (preset) => preset[0] === "@babel/preset-env"
8
+ )[1].modules = "auto";
10
9
 
11
10
  // These are packages we know ship with esmodules and need to be transformed
12
11
  const esModules = [
@@ -18,7 +17,7 @@ const esModules = [
18
17
  "@stanlemon/server-with-auth",
19
18
  ].join("|");
20
19
 
21
- export default {
20
+ module.exports = {
22
21
  verbose: true,
23
22
  setupFilesAfterEnv: [path.resolve(__dirname, "./jest.setup.js")],
24
23
  testEnvironment: "jsdom",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stanlemon/webdev",
3
- "version": "0.1.46",
3
+ "version": "0.1.49",
4
4
  "description": "My typical web development setup, but without all the copy and paste.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -13,7 +13,7 @@
13
13
  "engines": {
14
14
  "node": ">=16.13.0"
15
15
  },
16
- "type": "module",
16
+ "type": "commonjs",
17
17
  "scripts": {
18
18
  "test": "WEBDEV_ENTRY=./webpack.test.tsx webpack build",
19
19
  "lint": "eslint --ext js,jsx,ts,tsx ./",
package/tsconfig.json CHANGED
@@ -1,13 +1,11 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "noEmit": true,
4
- "target": "esnext",
4
+ "target": "ES2021",
5
5
  "lib": [
6
- "dom",
7
- "dom.iterable",
8
- "esnext"
6
+ "ES2021",
7
+ "DOM",
9
8
  ],
10
- "sourceMap": true,
11
9
  "declaration": true,
12
10
  "declarationMap": true,
13
11
  "allowJs": true,
@@ -17,7 +15,7 @@
17
15
  "forceConsistentCasingInFileNames": true,
18
16
  "noFallthroughCasesInSwitch": true,
19
17
  "noImplicitAny": true,
20
- "module": "commonjs",
18
+ "module": "ES6",
21
19
  "moduleResolution": "node",
22
20
  "resolveJsonModule": true,
23
21
  "isolatedModules": true,
package/webpack.config.js CHANGED
@@ -1,17 +1,15 @@
1
- import path from "path";
2
- import { readFileSync, existsSync } from "fs";
3
- import webpack from "webpack";
4
- import HtmlWebpackPlugin from "html-webpack-plugin";
5
- import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
6
- import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
7
- import { CleanWebpackPlugin } from "clean-webpack-plugin";
8
- import { config as dotenv } from "dotenv";
1
+ const path = require("path");
2
+ const { existsSync } = require("fs");
3
+ const webpack = require("webpack");
4
+ const HtmlWebpackPlugin = require("html-webpack-plugin");
5
+ const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
6
+ const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
7
+ const { CleanWebpackPlugin } = require("clean-webpack-plugin");
8
+ const { config } = require("dotenv");
9
9
 
10
- dotenv();
10
+ config();
11
11
 
12
- const babelOptions = JSON.parse(
13
- readFileSync(new URL("./.babelrc.json", import.meta.url))
14
- );
12
+ const babelOptions = require("./.babelrc.json");
15
13
 
16
14
  // Entry points, which can be separated by a semi-colon
17
15
  const WEBDEV_ENTRY = process.env.WEBDEV_ENTRY ?? "./src/index.tsx";
@@ -37,7 +35,7 @@ WEBDEV_PROXY.split(";").forEach((entry) => {
37
35
 
38
36
  const isDevelopment = NODE_ENV !== "production";
39
37
 
40
- export default {
38
+ module.exports = {
41
39
  mode: isDevelopment ? "development" : "production",
42
40
  entry: WEBDEV_ENTRY.split(";"),
43
41
  output: {
@@ -1,28 +0,0 @@
1
- "use strict";
2
- /*
3
- * ATTENTION: An "eval-source-map" devtool has been used.
4
- * This devtool is neither made for production nor for readable output files.
5
- * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
6
- * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
7
- * or disable the default devtool with "devtool: false".
8
- * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
9
- */
10
- (self["webpackChunk_stanlemon_webdev"] = self["webpackChunk_stanlemon_webdev"] || []).push([["main"],{
11
-
12
- /***/ 6738:
13
- /*!**************************!*\
14
- !*** ./webpack.test.tsx ***!
15
- \**************************/
16
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
-
18
- eval("var _home_runner_work_javascript_javascript_node_modules_react_refresh_runtime_js__WEBPACK_IMPORTED_MODULE_0___namespace_cache;\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _home_runner_work_javascript_javascript_node_modules_react_refresh_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/react-refresh/runtime.js */ 9139);\n/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ 7029);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ 2322);\n/* provided dependency */ var __react_refresh_utils__ = __webpack_require__(/*! ../../node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js */ 5506);\n\n__webpack_require__.$Refresh$.runtime = /*#__PURE__*/ (_home_runner_work_javascript_javascript_node_modules_react_refresh_runtime_js__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (_home_runner_work_javascript_javascript_node_modules_react_refresh_runtime_js__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(_home_runner_work_javascript_javascript_node_modules_react_refresh_runtime_js__WEBPACK_IMPORTED_MODULE_0__, 2)));\n\n\n\n\n\nfunction App({\n name\n}) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(\"div\", {\n children: [\"Hello \", name, \"!\"]\n });\n}\n\n_c = App;\nconst root = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot)(document.body.appendChild(document.createElement(\"div\")));\nroot.render( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(App, {\n name: \"world\"\n}));\n\nvar _c;\n\n__webpack_require__.$Refresh$.register(_c, \"App\");\n\nconst $ReactRefreshModuleId$ = __webpack_require__.$Refresh$.moduleId;\nconst $ReactRefreshCurrentExports$ = __react_refresh_utils__.getModuleExports(\n\t$ReactRefreshModuleId$\n);\n\nfunction $ReactRefreshModuleRuntime$(exports) {\n\tif (false) {}\n}\n\nif (typeof Promise !== 'undefined' && $ReactRefreshCurrentExports$ instanceof Promise) {\n\t$ReactRefreshCurrentExports$.then($ReactRefreshModuleRuntime$);\n} else {\n\t$ReactRefreshModuleRuntime$($ReactRefreshCurrentExports$);\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjczOC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQTs7OztBQU1BLFNBQVNDLEdBQVQsQ0FBYTtFQUFFQztBQUFGLENBQWIsRUFBOEI7RUFDNUIsb0JBQU87SUFBQSxxQkFBWUEsSUFBWjtFQUFBLEVBQVA7QUFDRDs7S0FGUUQ7QUFJVCxNQUFNRSxJQUFJLEdBQUdILDREQUFVLENBQ3JCSSxRQUFRLENBQUNDLElBQVQsQ0FBY0MsV0FBZCxDQUEwQkYsUUFBUSxDQUFDRyxhQUFULENBQXVCLEtBQXZCLENBQTFCLENBRHFCLENBQXZCO0FBR0FKLElBQUksQ0FBQ0ssTUFBTCxlQUFZLHVEQUFDLEdBQUQ7RUFBSyxJQUFJLEVBQUM7QUFBVixFQUFaIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQHN0YW5sZW1vbi93ZWJkZXYvLi93ZWJwYWNrLnRlc3QudHN4PzgzYmMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3JlYXRlUm9vdCB9IGZyb20gXCJyZWFjdC1kb20vY2xpZW50XCI7XG5cbnR5cGUgUHJvcHMgPSB7XG4gIG5hbWU6IHN0cmluZztcbn07XG5cbmZ1bmN0aW9uIEFwcCh7IG5hbWUgfTogUHJvcHMpIHtcbiAgcmV0dXJuIDxkaXY+SGVsbG8ge25hbWV9ITwvZGl2Pjtcbn1cblxuY29uc3Qgcm9vdCA9IGNyZWF0ZVJvb3QoXG4gIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKSlcbik7XG5yb290LnJlbmRlcig8QXBwIG5hbWU9XCJ3b3JsZFwiIC8+KTtcbiJdLCJuYW1lcyI6WyJjcmVhdGVSb290IiwiQXBwIiwibmFtZSIsInJvb3QiLCJkb2N1bWVudCIsImJvZHkiLCJhcHBlbmRDaGlsZCIsImNyZWF0ZUVsZW1lbnQiLCJyZW5kZXIiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///6738\n");
19
-
20
- /***/ })
21
-
22
- },
23
- /******/ __webpack_require__ => { // webpackRuntimeModules
24
- /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
25
- /******/ __webpack_require__.O(0, ["react-node_modules_react-dom_client_js-node_modules_react-refresh_runtime_js-node_modules_rea-832849","vendors"], () => (__webpack_exec__(794), __webpack_exec__(6101), __webpack_exec__(6738)));
26
- /******/ var __webpack_exports__ = __webpack_require__.O();
27
- /******/ }
28
- ]);