@stanlemon/webdev 0.1.165 → 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 +3 -1
- package/package.json +1 -1
- package/webpack.config.js +13 -1
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
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 =
|
|
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
|