Closed ahurlburt closed 6 years ago
@ahurlburt
What happens if you run babel directly, without using static_precompiler
, like so:
/usr/local/bin/babel --presets env /var/www/testSite/static/js/test/test.es6
It looks like a bug in babel, see https://github.com/babel/babel/issues/4186
Thanks for the tool. It works great for compiling my less files. Could you please provide an example of babel in the docs? I can't get this working.
I get the error: StaticCompilationError at /test/ Error: Couldn't find preset "env" relative to directory "/var/www/testSite/static/js/test"
In settings.py
STATIC_PRECOMPILER_COMPILERS = ( ('static_precompiler.compilers.Babel', { "executable": "/usr/local/bin/babel", "presets": "env", }), 'static_precompiler.compilers.LESS' )
I installed babel via npm: npm install -g --save-dev babel-cli babel-preset-env
I have the package for env but it seems like it doesn't know where to look?