Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

Make inclusion of react-router (JS) optional #3

Open
catmando opened this issue Oct 18, 2016 · 5 comments
Open

Make inclusion of react-router (JS) optional #3

catmando opened this issue Oct 18, 2016 · 5 comments

Comments

@catmando
Copy link
Contributor

Comment from @barriehadfield:

The other gotcha I have gotten over is that Hyperlink Router includes its own source of React and this is a nightmare for me as I get into NPM version hell, so I use a fork with no source included and get React and ReactDOM via NPM

@catmando catmando added this to the Release 0.15 milestone Nov 21, 2017
@janbiedermann
Copy link
Contributor

Hyperloop.cancel_import in application.rb

@barriehadfield
Copy link
Member

In application.rb or hyperloop.rb ?

@janbiedermann
Copy link
Contributor

in app/javascripts/application.rb

@catmando
Copy link
Contributor Author

catmando commented Nov 24, 2017

I guess it works in either place... in the initializer it would be config.cancel_import ... and as @janbiedermann has discovered you can also call it from application.rb (I didn't realize that would work :-) )

My personal preference is in the initializer. More rails-ish. Just let the application.rb be a file that is never edited, and control config through the initializer or if working with JS files through the webpack stuff.

@janbiedermann
Copy link
Contributor

should be documented, that when pulling in react or router or whatever js by node, webpacker whatever, hyperloop imports must be cancelled

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants