I see that the antler Javascript target has been added to NPM.
I've added the "antlr4" : "^4.5.2" dependency to my package,son file.
When I try to build through webpack I get the following error:
ERROR in ./~/antlr4/FileStream.js
Module not found: Error: Cannot resolve module 'fs' in <my project path>/node_modules/antlr4
@ ./~antlr4/FileStream.js 38:20-33
The offending line is
var fs = isNodeJs ? require("FS") : null;
I'm going to be running in the browser, so I'm not node.js, but webpack doesn't know which way that ternary statement will evaluate and tries to resolve it.
Any suggestions on how to resolve this?
I'm not sure if it's the require.js (if so, I'm not sure how to reference it. I'm also using the Babel transpiler for ES2015 syntax, and importing require.js doesn't work)
or if it's the 'fs' module (like the error message indicates. I've tried adding "fs" to my dependencies as well, but that's not resolving the problem.
anyone have any clues?