Closed markuzzi closed 4 years ago
With LRUCache updated to version 5.1.1, the vue component compiler utils throw the error TypeError: Class constructor LRUCache cannot be invoked without 'new'
TypeError: Class constructor LRUCache cannot be invoked without 'new'
I think this is due to line 9 in lib/parse.ts:
const cache = require('lru-cache')(100)`;
If this would be changed to
const LRUCache = require('lru-cache'); const cache = LRUCache(100);
I think this would fix the problem.
Does it make sense?
This project depends on lru-cache v4 at the moment. PR's welcome.
lru-cache
PR: https://github.com/vuejs/component-compiler-utils/pull/83
With LRUCache updated to version 5.1.1, the vue component compiler utils throw the error
TypeError: Class constructor LRUCache cannot be invoked without 'new'
I think this is due to line 9 in lib/parse.ts:
If this would be changed to
I think this would fix the problem.
Does it make sense?