let _fs_readFile = _util.promisify(_fs.readFile)
-let _build_cache = new _BuildCache(true)
+let _build_cache = new _BuildCache()
let _js_template = async (_root, _dir, _name) => {
while (_name.charAt(0) === '/') {
_dir = _root
return _build_cache.get(
_name,
async _result => {
+ _text = await _fs_readFile(_name, {encoding: 'utf-8'})
+ console.log('compiling', _name)
let _dir = _path.posix.dirname(_name)
let _req = async _name => _js_template(_root, _dir, _name)
_result.value = await (
_transform.transform(
_visitors,
_acorn.parse(
- '(async function() {' +
- await _fs_readFile(_name, {encoding: 'utf-8'}) +
- '})'
+ '(async function() {' + _text + '})'
)
),
{indent: ''}