You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
When I try to use plugin-less in conjunction with server-side rendering, I get the following error:
err (SystemJS) document is not defined
ReferenceError: document is not defined
at SystemJSNodeLoader.CSSPluginBase.instantiate (/path/to/jspm_packages/github/systemjs/plugin-css@0.1.30/css-plugin-base.js:64:24)
Error loading /path/to/style.less!/path/to/jspm_packages/github/systemjs/plugin-less@0.1.2/less.js as "./style.less!" from /path/to/style.js
The root cause of the problem is CSSPluginBase.prototype.instantiate(), which attempts to inject a style element into the DOM without document being defined:
See: systemjs/plugin-less#6
When I try to use plugin-less in conjunction with server-side rendering, I get the following error:
The root cause of the problem is
CSSPluginBase.prototype.instantiate(), which attempts to inject a style element into the DOM withoutdocumentbeing defined:Explicitly checking if
documentis defined inCSSPluginBase.prototype.instantiate()seems appropriate and works for me in practice:But maybe that is not desirable for some reason?