react project is packaged in webpack, and you can directly use the path module in require node.
but require ("fs") will report an error:
looked it up on the Internet and added this configuration to webpack.config:
node:{
fs:"empty"
},
the compilation can pass at this time, but when using fs= {}, it will report an error.
have you seen that you can use browserify, but you can"t use fs module at the front end if you only use webpack?