When webpack is packaged, babel does not transfer the files one layer above the startup directory.

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

clipboard.png

.babelrc configuration is fine

{
"presets": ["env","es2015" ,"stage-2"],
  "plugins": ["transform-class-properties"]
}
Jun.10,2021
Has the problem of

been solved later?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e50851-450a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e50851-450a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?