Closed EdwardDrapkin closed 8 years ago
When I try to use polyglot with webpack, I get this error from webpack:
ERROR in ./~/polyglot/i18n.js Module not found: Error: Can't resolve 'fs' in 'node_modules/polyglot' @ ./~/polyglot/i18n.js 9:7-20
What am I doing wrong? My code is only:
import Polyglot from 'polyglot'; const p = new Polyglot();
import Polyglot from 'polyglot';
const p = new Polyglot();
fs can't possibly work in a browser, so there'd be no point browserifying/webpacking something that requires it.
When I try to use polyglot with webpack, I get this error from webpack:
ERROR in ./~/polyglot/i18n.js Module not found: Error: Can't resolve 'fs' in 'node_modules/polyglot' @ ./~/polyglot/i18n.js 9:7-20
What am I doing wrong? My code is only:
import Polyglot from 'polyglot';
const p = new Polyglot();