Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

lesavage
Inspiring
Feb 2, 2015 4:05 PM UTC

Hi Alexander,

JavaScript Modules

All third-party node JavaScript modules are supported. The root search path of third-party modules is the directory which contains your html file. For example, when you do require in file:///your_extension/index.html, CEP will lookup modules under file:///your_extension/node_modules, this rule is exactly the same with upstream node.

Native Modules

Node.js native modules are not directly supported since CEP is using a different V8 version from the official node.

Kind regards,

Lea

Translate
AlexanderSh
Participant
Feb 2, 2015 4:37 PM UTC

> Node.js native modules are not directly supported


Thanks for the reply. Does this mean that Node.js native modules may still be supported indirectly? Otherwise, how should the said example work?

Translate
Community Expert
Sep 16, 2023 5:16 AM UTC

One indirect is to use wasm instead of the node library. For example I wanted to use sqlite but instead ended up using sqlite wasm and hosted it in an invisible extension.

-Manan

Translate
-Manan