-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Better support compile-to-JS languages? #2281
Comments
I played with a few different options but each seems to have its own issues.
The only viable option remaining seems to |
Doesn't symlinking work?
It should still be reloaded in this case. |
Oh, I dismissed that possibility since there already is a Not pretty but better than |
I'm developing shadow-cljs which is a ClojureScript build tool. The goal is to provide zero-config interop with existing JS tools like this one. It is already zero-config with one exception: File reloading does not work.
ClojureScript organizes code into namespaces, which means that a
demo.foo
namespace should be insrc-cljs/demo/foo.cljs
. To make this actually zero config the tool will compile to./node_modules/shadow-cljs/demo.foo.js
which you can thenrequire("shadow-cljs/demo.foo")
(orimport
).This works nicely, except that
yarn start
will not reload changes because of thisI understand why this is there so I'm looking for other ways to still get good interop. One way would be to provide a way to override the
watchOptions
without eject-ing. I just need a way to getignored: /node_modules\/(?!shadow-cljs)/
in there.The generate into
node_modules
"hack" is probably not the recommended way to do things but it just works. Whereas all other solutions I tried required way too much configuration and juggling too many relative paths.Any thoughts on a solution that doesn't require
eject
?The text was updated successfully, but these errors were encountered: