Does ClearScript allow the use of node modules like JSDOM ? #486
-
I am trying to find out if I can evaluate something like require('jsdom') or an equivalent syntax which will pull in JSDOM and all its dependencies. A clarification on this would help me immensely. Thanks!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @nikhil-archerirm,
Not without a lot of work, unfortunately. Like many JavaScript libraries, jsdom seems to be closely tied to Node.js, depending not only on elements of the Node.js API but also on its support of the node_modules directory structure and package.json manifest format. ClearScript on the other hand provides only a standard JavaScript environment. It supports ES6 and CommonJS modules but no Node.js-specific functionality. Sorry! |
Beta Was this translation helpful? Give feedback.
Hello @nikhil-archerirm,
Not without a lot of work, unfortunately. Like many JavaScript libraries, jsdom seems to be closely tied to Node.js, depending not only on elements of the Node.js API but also on its support of the node_modules directory structure and package.json manifest format.
ClearScript on the other hand provides only a standard JavaScript environment. It supports ES6 and CommonJS modules but no Node.js-specific functionality.
Sorry!