From 87d190155ecfe5ed79998d32173dc8ceb0d7ee11 Mon Sep 17 00:00:00 2001 From: Manuel Spigolon Date: Sun, 12 Sep 2021 12:37:36 +0200 Subject: [PATCH] docs: clarification standalone requirements (#1738) --- docs/standalone.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/standalone.md b/docs/standalone.md index 5a9a1dee6..b4f32daab 100644 --- a/docs/standalone.md +++ b/docs/standalone.md @@ -70,7 +70,9 @@ const requireFromString = require("require-from-string") const standaloneValidate = requireFromString(moduleCode) // for a single default export ``` -Ajv package should still be a run-time dependency for most schemas, but generated modules can only depend on code in [runtime](https://github.com/ajv-validator/ajv/tree/master/lib/runtime) folder, so the whole Ajv will not be included in the bundle (or executed) if you require the modules with standalone validation code from your application code. +### Requirement at runtime + +To run the standalone generated functions, the Ajv package should still be a run-time dependency for most schemas, but generated modules can only depend on code in [runtime](https://github.com/ajv-validator/ajv/tree/master/lib/runtime) folder, so the whole Ajv will not be included in the bundle (or executed) if you require the modules with standalone validation code from your application code. ## Configuration and limitations