both class are the same file
class hui{
constructor(){
}
log=function(){
console.log(123)
}
}
var h = new hui();
h.log();
export default hui;
contents of test.js
require("../searchWidget/class")
require("./class");
when I execute webpack in the current directory of test.js, the first require will report an error in syntax, but not at the same level. Do you want to know where the limitation of the directory is set
.babelrc configuration is fine
{
"presets": ["env","es2015" ,"stage-2"],
"plugins": ["transform-class-properties"]
}