Pre-compilation des fichiers JSX avant build
This commit is contained in:
13
index.html
13
index.html
@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user