@marko/compiler 5.37.25 → 5.38.0

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/config.d.ts CHANGED
@@ -24,7 +24,7 @@ declare const Config: {
24
24
  hydrateIncludeImports?: RegExp | ((request: string) => boolean);
25
25
  hydrateInit?: boolean;
26
26
  optimize?: boolean;
27
- optimizeKnownTemplates?: string[];
27
+ optimizeRegistryId?: (request: string) => string | number;
28
28
  cache?: Map<unknown, unknown>;
29
29
  hot?: boolean;
30
30
  /** @deprecated */
package/dist/config.js CHANGED
@@ -167,7 +167,6 @@ var _lassoPackageRoot = require("lasso-package-root");
167
167
 
168
168
 
169
169
 
170
-
171
170
 
172
171
 
173
172
  var _config = _interopRequireDefault(require("./taglib/config"));const config = { // The default output mode for compiled templates
@@ -206,10 +205,9 @@ var _config = _interopRequireDefault(require("./taglib/config"));const config =
206
205
  * Enables production mode optimizations if true, or not if false.
207
206
  * If left as undefined checks for env === "production".
208
207
  */optimize: undefined, /**
209
- * If `optimize` is enabled you can provide an array of template paths which the compiler will
210
- * use to generate shorter registry/template ids using incrementing ids. This can only be used
211
- * if the same `optimizeKnownTemplates` are used for both server and client compilations.
212
- */optimizeKnownTemplates: undefined, /**
208
+ * If `optimize` is enabled this function will be called to resolve the "template id" used for Marko's
209
+ * hydration registry.
210
+ */optimizeRegistryId: undefined, /**
213
211
  * This option should be set if `hydrate` output is specified.
214
212
  * Maps a virtual dependency to a resolved file which can be implemented
215
213
  * for specific bundlers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/compiler",
3
- "version": "5.37.25",
3
+ "version": "5.38.0",
4
4
  "description": "Marko template to JS compiler.",
5
5
  "keywords": [
6
6
  "babel",
@@ -66,7 +66,7 @@
66
66
  "@babel/traverse": "^7.25.9",
67
67
  "@babel/types": "^7.26.0",
68
68
  "@luxass/strip-json-comments": "^1.3.2",
69
- "@marko/babel-utils": "^6.5.13",
69
+ "@marko/babel-utils": "^6.6.0",
70
70
  "complain": "^1.6.1",
71
71
  "he": "^1.2.0",
72
72
  "htmljs-parser": "^5.5.2",
@@ -80,7 +80,7 @@
80
80
  "source-map-support": "^0.5.21"
81
81
  },
82
82
  "devDependencies": {
83
- "@marko/translator-default": "^6.0.25"
83
+ "@marko/translator-default": "^6.1.0"
84
84
  },
85
85
  "publishConfig": {
86
86
  "access": "public"