0

I am setting up the asset pipeline for a new project. We already use React.js along with webpack in a gulp-based build system and would like to use React for the new project as well. Now, since the application is written in django, I would like to port the pipeline to django-pipeline.

Ok, I can replace webpack with pipeline-browserify, and there's also PyReact for jsx compiling. But I am unable to pipe my jsx files first through the JSX compiler and then to browserify. As far as I can tell, there is just a single compiler stage with django-pipeline. Or am I missing something? Please tell me I'm wrong...

Thanks!

Nuschk
  • 518
  • 4
  • 14

1 Answers1

3

My quick way for dealing with this was just to also use the reactify plugin for browserify and adding PIPELINE_BROWSERIFY_ARGUMENTS = '-t reactify' to my Django settings.

Django-pipeline does support putting multiple compilers, though in my particular case, since I've used browserify more than django-pipeline, I used the single browserify compiler instead.

Alex T
  • 1,232
  • 10
  • 10
  • Thanks! That is exactly what I was looking for. Though, in the meantime, I've added a gulp compiler stage to my project (using webpack instead of browserify, but anyway). There's so much flexibility there, so I think I'm going to stay with it. – Nuschk Nov 21 '14 at 07:25