Yes, it works perfectly. The only interesting bit is integrating
create-react-app's watch mode with Pyramid, or any classic backend for that
matter, if you use server side routing.
Not very complicated, but to set up watch mode, you need to:
1. Eject the app
2. Make it look for a different port compared Pyramid. For example 3000 to
Webpack and 6543 to Pyramid or your favourite ports. By default it's hard
coded to use the window.location's port, so change that to 3000 manually.
3. I use the following Jinja2 snippet to eject the live script in devel
mode and just use the built js file in production.
{% if request.webpack %}
<script src="http://localhost:3000/static/js/bundle.js"></script>
{% else %}
<script src="{{ find_hash('wp/static/js/main.js') }}"></script>
{% endif %}
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pylons-discuss/d5f731b1-24e2-492a-8ef9-653cc8783290%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.