On Wednesday, May 10, 2017 at 11:45:02 PM UTC-5, Jiyin Yiyong wrote:
> Already an old boring topic... I'm from JavaScript side and so many people 
> are building apps with Webpack. And so many of alt-js languages got Webpack 
> loaders:
> 
> BuckleScript https://github.com/rrdelaney/bs-loader
> PureScript https://github.com/ethul/purs-loader
> Elm https://github.com/elm-community/elm-webpack-loader
> Fable https://github.com/fable-compiler/Fable
> 
> Exception:
> 
> No Webpack for ReasonML 
> https://github.com/chenglou/reason-react-example/blob/master/webpack.config.js
> 
> Can we make a loader for ClojureScript? 
> 
> Or how about the possibility? I guess Closure Compiler will get in the why. 
> But is it possible if I don't use dead code elimination from Closure 
> Compiler? I know many people need it but seriously no other solutions? And 
> how much does ClojureScript depend on Closure Library?

I'm from the JS side as well, so I'm glad to see this question!  Are you 
imagining something like the following?  We should probably start by imagining 
why someone would want to require cljs this way and if it would even make sense 
to:

```
require('cljs!./src-cljs') // return all goog.provided namespaces?
require('cljs!./src-cljs/foo/core.cljs') // return a single goog.provide 
namespace?
```

Either way I think it would need Closure Compiler to return a single asset for 
each require statement, if I understand webpack correctly.

It's worth mentioning that the recent "node-jre" package allows users to 
install/use the full cljs JVM compiler in its fully glory through npm without 
any external dependencies, which I've tested here: https://github.com/cljs/tool

I think it's possible—just unsure of webpack use-cases.  Thoughts?

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to