assert(render.deps.length === 0)
let full_pathname = require.resolve(render.pathname)
delete require.cache[full_pathname]
- result.value = await (require(full_pathname)).apply(
- null,
- [
- async pathname => {
- let temp = path.posix.dirname(key)
- while (pathname.charAt(0) === '/') {
- temp = this.root
- pathname = pathname.slice(1)
- }
- pathname = path.posix.resolve(temp, pathname)
- return this.get(pathname)
- },
- key,
- this.root
- ].concat(this.arg_values)
+ result.value = await require(full_pathname)(
+ // _require
+ async pathname => {
+ let temp = path.posix.dirname(key)
+ while (pathname.charAt(0) === '/') {
+ temp = this.root
+ pathname = pathname.slice(1)
+ }
+ pathname = path.posix.resolve(temp, pathname)
+ return this.get(pathname)
+ },
+ // _pathname
+ key,
+ // _root
+ this.root,
+ ...this.arg_values
)
}