monaca build does not compile jsx



  • I am new to onsen and monaca. I would like to try monaca + onsen ui + react. So I started to download Onsen UI V2 React Tabbar template with following command
    $ monaca create helloworld
    And I started to coding by changing src/App.jsx file and tested with
    monaca preview
    It worked as I wished. Than I wanted to install it to android phone. I build apk with following commands:
    $ monaca platform add android
    $ monaca build android
    It generates an apk file but it does not reflect my code, it reflects only original template code. I noticed there is no change for www/app.bundle.js.

    What’s wrong? Do I need to compile jsx file to www/app.bundle.js?

    Thanks


  • Onsen UI

    @coolman monaca preview is for development and loads everything in memory for faster debugging. If you want to test your app in real devices I’d recommend you using Monaca Debugger (and just run monaca debug in the CLI). That will put all the transpiled files in the device and refresh the app whenever you modify your code. Otherwise, just run monaca transpile to perform an actual transpilation of your coed and generate files.


Log in to reply