Pre-compilation des fichiers JSX avant build

This commit is contained in:
2015-10-09 14:22:23 +02:00
parent 40707be387
commit f12950df1a
18 changed files with 34 additions and 24 deletions

View File

@ -15,11 +15,16 @@
global.document = global.window.document;
global.navigator = global.window.navigator;
// Auto transform JSX
require('node-jsx').install();
var isDev = process.env.NODE_ENV === 'development';
// Launch application
require('./js/app.jsx');
if(isDev) {
// Auto transform JSX
require('node-jsx').install({extension: '.js'});
// Launch application
require('./js/app.js');
} else {
require('./js-compiled/app.js');
}
</script>