Create an empty mini-program API environment
Associate a backend context
If backendContext is not given, the DOM-based backend is used
(causes failure if running outside browsers).
The backend context SHOULD NOT be associated by other environments!
Optional backendContent: GeneralBackendContextCreate a component space that can manage WXML, WXSS, JS and static JSON config files
The space can be specified as a main space. This makes some features available:
app.wxss will be used as a style sheet for all root components in the space;StyleIsolation.Shared is accepted for components in the space.
Non-main spaces usually act as plugins.
publicComponents is a map for specifying a map of aliases and component paths.
A mini-program API environment
Each environment manages multiple backend contexts. However, a backend context should be exclusively managed by a single environment (to avoid
StyleScopeIdconfliction). It is able to create multipleCodeSpacewithin the environment.