-
Notifications
You must be signed in to change notification settings - Fork 2k
using CoffeeScript.compile in client with webpack #4277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please ask questions on StackOverflow or the google groups. |
Running into the same issue here while trying to consume the compiler API in browser. |
Use the browser compiler: <script src="http://coffeescript.org/v1/browser-compiler/coffee-script.js"></script> |
@GeoffreyBooth Thanks for the information. I'm aware of the browser-compiler build. However I believe the issue is about consuming CoffeeScript compiler with modern toolchain like webpack, which won't take more than a browser specific entry script and a Anyway, I'm using a custom fork for my project with compiler API exposed for webpack. Just |
This has come up a few times before, so I’d rather solve it in the main repo than ask people to use forks that can get out of date. But I’m not sure exactly what the ask is, without an example that demonstrates what you’re trying to do. |
@GeoffreyBooth From time to time, people will want to pack the CoffeeScript source directly into his bundle with webpack, rather than using the prebuilt one. The expectations is to simply require or import coffee-script and webpack will do the rest. But the problem is that coffee-script didn't provide a browser field in package.json pointing to a browser-specific entry script. And the main script references node specific modules. Hence it won't work. It would be ideal to solve this problem in main repo. My fork was too specific to send a PR. I'll send a proper one later. |
I am trying to use
CoffeeScript.compile ("code")
in browser but including the coffee-script library with webpack results in errors and warnings posted here #4276. The loader is not an option, because I don't have the code in advance.There are two versions of coffee-script-min.js:
That is why I am asking it here to get developers attention because I doubt that other users will have an idea on how the build was packaged.
I am kindly asking not to be referred to "google it" because it is insulting and serves no purpose. If you don't know how to solve this please do not comment or close, just pass it and let someone else take a look.
The text was updated successfully, but these errors were encountered: