Bundling js files with webpack class undefined

后端 未结 1 726
暖寄归人
暖寄归人 2021-01-21 04:25

Im bundling together the following files contents:

a.js:

class BaseC {
    doIt(){
        console.log(this);
    }
}

class A extends BaseC{
}


        
相关标签:
1条回答
  • 2021-01-21 04:31

    Try exporting the class from a.js: export class BaseC { ...

    and importing it into b.js: import {BaseC} from './a.js' ...

    0 讨论(0)
提交回复
热议问题