facebookarchive/react-python

Fails to build: django-pipeline==1.3.24

Closed this issue · 1 comments

Hi there, firstly thanks fro this useful plugin!

I'm having problems getting it working with django-pipeline however collectstatic renders the following:

Post-processed '/Users/rosscdh/Projects/my_app/toolkit/static/js/matter_search.js' as '/Users/rosscdh/Projects/my_app/toolkit/static/js/matter_search.js'

0 static files copied to '/Users/rosscdh/Projects/my_app/toolkit/static', 13115 unmodified, 1 post-processed.

The paths appear incorrect as it should be referencing matter_search.jsx (as in the settings.py files below.

Tried variations of:

PIPELINE_JS = {
    'reactjs': {
        'source_filenames': (
          '{SITE_ROOT}/toolkit/apps/matter/static/js/matter_search.jsx'.format(SITE_ROOT=SITE_ROOT),
        ),
        'output_filename': '{STATIC_ROOT}/js/matter_search.js'.format(STATIC_ROOT=STATIC_ROOT),
    }
}
PIPELINE_COMPILERS = (
  'react.utils.pipeline.JSXCompiler',
)

And

PIPELINE_JS = {
    'reactjs': {
        'source_filenames': (
          'toolkit/apps/matter/static/js/matter_search.jsx',
        ),
        'output_filename': 'toolkit/apps/matter/static/js/matter_search.js',
    }
}
PIPELINE_COMPILERS = (
  'react.utils.pipeline.JSXCompiler',
)

However, it works perfectly if I create a custom management command and issue manual JSX transform.

I seem to have missed something or am overlooking a tree in the forest.

Thanks in advance

Ah! nevermind.. problem between user and keyboard

STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineStorage'

was causing it not to run the packaging processes.. mea culpa!