my Webpack version is v1.15.0.
I just require('fs')
in my JS file, but I got the error:
Uncaught Error: Cannot find module "fs"; and when I add node{ fs: 'empty' },
and then I got another error:
fs.readdirSync is not a function
if I add:
externals:{
"fs": "commonjs fs"
},
I get another error:
Uncaught ReferenceError: require is not defined
Why? How can I fixed it?
EDIT : when I put all my file's names on a file .txt and I get the file .txt with $http.get it's working fine