The import statement depends on access to a file system. The way this is acheived is through node's filesystem API. When XforJS isn't running in a node environment, the import statement is disabled.
Compiled template files depend on reusable methods stored in an output library. The
getLib method of the
XforJS namespace returns the library that is needed by all compiled template files. You can include this seperately to reduce the overall size of compiled template files when the Compiler is configured accordingly.