diff --git a/docs/documentation.html b/docs/documentation.html index 5eddcdbf..eaa3affd 100644 --- a/docs/documentation.html +++ b/docs/documentation.html @@ -746,8 +746,16 @@

Importing External Rules

grammar, NOT the source. Grammars MUST be compiled by a version that supports imports in order to be imported. Only rules that are allowed start rules are valid. It can be useful to specify - --allowed-start-rules \* in library grammars. All of the - following are valid:

+ --allowed-start-rules \* in library grammars. Imports are + only valid in output formats "es" and "commonjs". If you + use imports, you should use { output: "source" }; the default + output of "parser" will call `eval` on the source which fails immediately + for some formats (e.g. "es") and will not find modules in the expected + places for others (e.g. "commonjs"). The + ["from-mem"](https://github.com/peggyjs/from-mem/) project is used by + the Peggy CLI to resolve these issues, but note well its relatively severe + limitations.

+

All of the following are valid: