In the process of developing my Vue app, I'm focusing on creating some helper classes:
File a.js:
export default class Base {//...}
File b.js:
import Base from "./a"
export default class Middle extends Base { // ... }
File c.js:
import Middle from "./b" // Middle here is undefined
export default class Final extends Middle { // ... }}
Whenever I try to import Middle, it shows up as undefined and throws an error stating
Uncaught TypeError: Super expression must either be null or a function
when extending with extends Middle
I've attempted another approach like this:
let Middle = class Middle ....
export default Middle
Even though theoretically it should work, it did not resolve the issue for me.
My goal is to create a component that functions as a standalone library using:
vue-cli-service build --target lib