Browserify with require('fs')

前端 未结 5 1135
感动是毒
感动是毒 2020-11-28 11:24

I was trying to use browserify on a file that uses the fs object. When I browserify it, the call to require(\'fs\') doesn\'t get transformed and require

5条回答
  •  囚心锁ツ
    2020-11-28 11:55

    If you want to run file system with browserify you can install npm.

    npm install browserify-fs 
    

    and you can access fs object on client side.
    Thanks

提交回复
热议问题