Closed brpaz closed 2 years ago
Hey - not sure how to best solve this. It looks like coffee-script 1 at least just doesn't have a version that works in a browser. For formatting CSON I have used require('cson-parser/lib/stringify')
in the past (which is a hack) but I'm not sure there's an official way to do the same for parsing as well.
This might be solved by upgrading cson-parser
to coffee-script 2 but since they changed the name of the npm package, that it unlikely to happen anytime soon (it would cause for anybody who has a reference to coffee-script
in their dependency tree). :(
What you could try is to selectively replace some of the code with empty files in your webpack config. But I'm not sure that'd be enough.
I face the same problem.
require('cson-parser/lib/stringify')
work in webpack.
But require('cson-parser/lib/parse')
not work.
@gluons Yeah, parse
pulls in the coffeescript
entry point and that one accesses a lot of APIs that won't work in webpack. We generally do things like parsing on the server so we don't run into it. But PRs making it work are definitely appreciated. :)
I am in the process on clean up old open issues. Since this is an old issue and I don´t use this project anymore, I will close it.
Hello. I am trying to use cson-parser in a project using webpack and its not working. Webpack tries to load the binary "coffee"
I am trying to exclude the file from being processed by webpack but still couldnt find a working solution.