marko 5.36.0 → 5.36.2

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.
@@ -29,4 +29,4 @@ async function handleRequest(request) {
29
29
  ### BYOB (Bring your own bundler)
30
30
 
31
31
  For the large portion of Marko's API a bundler is required. The example code above assumes that Marko templates can be loaded in your environment.
32
- Marko supports a number of bundlers, [take a look through our supported bundlers](#bundler-integrations) and pick what works best for you.
32
+ Marko supports a number of bundlers, [take a look through our supported bundlers](https://markojs.com/docs/bundler-integrations-overview/) and pick what works best for you.
package/docs/compiler.md CHANGED
@@ -206,17 +206,12 @@ Default: [environment based](https://github.com/marko-js/marko/blob/0f212897d2d3
206
206
 
207
207
  Enables production mode optimizations.
208
208
 
209
- #### `optimizeRegistryId`
209
+ #### `optimizeKnownTemplates`
210
210
 
211
- Type: `(request: string) => string | number`<br>
211
+ Type: `string[]`<br>
212
212
  Default: `undefined`
213
213
 
214
- If `optimize` is enabled this function will be called with each "template id" / "registry id" that Marko uses for hydration.
215
- The function must return a number (which will be encoded) or a string which is used verbatim.
216
-
217
- It is _required_ that when a template is compiled for the server it is given the same id when it is compiled for the browser.
218
-
219
- Without this function Marko will use a generic hash of the raw `request` id.
214
+ If `optimize` is enabled you can provide an array of template paths which the compiler will use to generate shorter registry/template ids using incrementing ids. This can only be used if the same `optimizeKnownTemplates` are used for both server and client compilations.
220
215
 
221
216
  #### `resolveVirtualDependency`
222
217
 
package/docs/fastify.md CHANGED
@@ -62,4 +62,4 @@ To know more about sending the data to the browser checkout:
62
62
  ### BYOB (Bring your own bundler)
63
63
 
64
64
  For the large portion of Marko's API a bundler is required. The example code above assumes that Marko templates can be loaded in your environment.
65
- Marko supports a number of bundlers, [take a look through our supported bundlers](#bundler-integrations) and pick what works best for you.
65
+ Marko supports a number of bundlers, [take a look through our supported bundlers](https://markojs.com/docs/bundler-integrations-overview/) and pick what works best for you.
package/docs/http.md CHANGED
@@ -31,4 +31,4 @@ server.listen(port, () => {
31
31
  ### BYOB (Bring your own bundler)
32
32
 
33
33
  For the large portion of Marko's API a bundler is required. The example code above assumes that Marko templates can be loaded in your environment.
34
- Marko supports a number of bundlers, [take a look through our supported bundlers](#bundler-integrations) and pick what works best for you.
34
+ Marko supports a number of bundlers, [take a look through our supported bundlers](https://markojs.com/docs/bundler-integrations-overview/) and pick what works best for you.
package/docs/koa.md CHANGED
@@ -32,4 +32,4 @@ app.listen(8080);
32
32
  ### BYOB (Bring your own bundler)
33
33
 
34
34
  For the large portion of Marko's API a bundler is required. The example code above assumes that Marko templates can be loaded in your environment.
35
- Marko supports a number of bundlers, [take a look through our supported bundlers](#bundler-integrations) and pick what works best for you.
35
+ Marko supports a number of bundlers, [take a look through our supported bundlers](https://markojs.com/docs/bundler-integrations-overview/) and pick what works best for you.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.36.0",
3
+ "version": "5.36.2",
4
4
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
5
5
  "keywords": [
6
6
  "front-end",
@@ -66,8 +66,8 @@
66
66
  "build": "babel ./src --out-dir ./dist --extensions .js --copy-files --config-file ../../babel.config.js --env-name=production"
67
67
  },
68
68
  "dependencies": {
69
- "@marko/compiler": "^5.38.0",
70
- "@marko/translator-default": "^6.1.0",
69
+ "@marko/compiler": "^5.38.2",
70
+ "@marko/translator-default": "^6.1.1",
71
71
  "app-module-path": "^2.2.0",
72
72
  "argly": "^1.2.0",
73
73
  "browser-refresh-client": "1.1.4",