CommonJS modules in JavaScriptCore

This project is an attempt to add add support for CommonJS modules in JavaScriptCore engine.

This project references jsc-require rewritten in swift.

中文讲解: 在 JavaScriptCore 中使用模块导入

Usage

copy JavascriptCoreDemo\extensions\JSContext-Extensions.swift into your project.

import JavaScriptCore

let context = JSContext()
context.enhancementMode()

For more information, please check the project.

Thanks

GitHub

View Github