Import Statement
Enabling Stof import statements.
Stof import statements use the file system library. Although this library is not enabled by default in a WebAssembly context, we can add it ourselves.
This is for non-browser JavaScript, where system access is available.
See Imports for more information on the Stof import statement.
Text Files
For the Stof import statement, we need the 'fs.read(..)' function. This function is used internally by the loaded formats in the document.
Note that if you are aware of the file to be included, it's probably easier to use the "importString(..)" function after reading the file into a string yourself.
Last updated
Was this helpful?