@timber-js/app 0.2.0-alpha.223 → 0.2.0-alpha.224
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/_chunks/{dev-server-C61GWpGg.js → dev-server-B7o4As0l.js} +15 -1
- package/dist/_chunks/dev-server-B7o4As0l.js.map +1 -0
- package/dist/_chunks/dev-server-hZzmbMvK.js +1 -0
- package/dist/cli.js +1 -1
- package/dist/config-types.d.ts +18 -0
- package/dist/config-types.d.ts.map +1 -1
- package/dist/config-validation.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +433 -9
- package/dist/index.js.map +1 -1
- package/dist/plugins/optimize-package-imports-defaults.d.ts +13 -0
- package/dist/plugins/optimize-package-imports-defaults.d.ts.map +1 -0
- package/dist/plugins/optimize-package-imports.d.ts +113 -0
- package/dist/plugins/optimize-package-imports.d.ts.map +1 -0
- package/docs/api/34-api-config.mdx +20 -0
- package/package.json +1 -1
- package/src/config-types.ts +18 -0
- package/src/config-validation.ts +20 -0
- package/src/index.ts +2 -0
- package/src/plugins/optimize-package-imports-defaults.ts +88 -0
- package/src/plugins/optimize-package-imports.ts +439 -0
- package/dist/_chunks/dev-server-C61GWpGg.js.map +0 -1
- package/dist/_chunks/dev-server-CBvvM7Lr.js +0 -1
|
@@ -1147,6 +1147,7 @@ var knownKeys = new Set(Object.keys({
|
|
|
1147
1147
|
limits: true,
|
|
1148
1148
|
forms: true,
|
|
1149
1149
|
pageExtensions: true,
|
|
1150
|
+
optimizePackageImports: true,
|
|
1150
1151
|
slowRequestMs: true,
|
|
1151
1152
|
renderTimeoutMs: true,
|
|
1152
1153
|
devBrowserLogs: true,
|
|
@@ -1204,6 +1205,19 @@ function validateConfig(config) {
|
|
|
1204
1205
|
}
|
|
1205
1206
|
}
|
|
1206
1207
|
}
|
|
1208
|
+
if (config.optimizePackageImports !== void 0) {
|
|
1209
|
+
const list = config.optimizePackageImports;
|
|
1210
|
+
const badIndex = Array.isArray(list) ? list.findIndex((entry) => typeof entry !== "string" || entry.trim() === "") : -1;
|
|
1211
|
+
if (!Array.isArray(list) || badIndex !== -1) {
|
|
1212
|
+
const value = Array.isArray(list) ? list[badIndex] : list;
|
|
1213
|
+
errors.push({
|
|
1214
|
+
field: "optimizePackageImports",
|
|
1215
|
+
message: Array.isArray(list) ? `optimizePackageImports contains an invalid entry: ${String(JSON.stringify(value))}` : "optimizePackageImports must be an array of import specifiers.",
|
|
1216
|
+
value,
|
|
1217
|
+
suggestion: "Example: optimizePackageImports: [\"@acme/icons\", \"react-icons/fa\"]"
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1207
1221
|
if (config.allowedOrigins !== void 0) {
|
|
1208
1222
|
if (!Array.isArray(config.allowedOrigins)) errors.push({
|
|
1209
1223
|
field: "allowedOrigins",
|
|
@@ -2416,4 +2430,4 @@ function listenForClientErrors(server, projectRoot) {
|
|
|
2416
2430
|
}
|
|
2417
2431
|
export { formatMissingPeers as a, checkPeerDependencies as i, timberDevServer as n, reportConfigErrors as o, toWebRequest as r, validateConfig as s, RESTART_EXIT_CODE as t };
|
|
2418
2432
|
|
|
2419
|
-
//# sourceMappingURL=dev-server-
|
|
2433
|
+
//# sourceMappingURL=dev-server-B7o4As0l.js.map
|