Skip to content

How to execute loading module by require? #187

@lhf552004

Description

@lhf552004

Hi, I'm going to load a module below:
var lunrMutable = require('lunr-mutable-indexes');
But I don't know how to load this module correctly.
My steps is load a single file /lunr-mutable-indexes/lunr-mutable.js
But it is failed. The problem is this module is not a single file, besides it would load another module inside it. For example it would load lunr module.

engine = new Jurassic.ScriptEngine();
engine.ExecuteFile("lib/require.js/require.min.js");
engine.ExecuteFile("lib/lunr.js/lunr.js");
//engine.Execute("var lunrMutable = require('lunr-mutable-indexes');");
engine.ExecuteFile("lib/lunr-mutable-indexes/lunr-mutable.js");

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions