Open qeelei opened 1 year ago
You are running both examples using the same runtime? What If you try to run the unit tests?
@davideicardi Yes it is in the same runtime. I am using the Electron
framework, and these examples are running within a script called preload.
The following is the result after I execute npm run test
:
And when I only install
the packages without require
, the error mentioned in my question is not thrown.
const manager = new PluginManager()
await manager.install('lodash')
// const _ = manager.require('lodash')
// console.log('defaults: ', _.defaults({ a: 1 }, { a: 3, b: 2 }))
I am trying to install and use the
lodash
package:But the following error is thrown:
Uncaught (in promise) Error: Code generation from strings disallowed for this context
This
moment
example works finehttps://github.com/davideicardi/live-plugin-manager#usage