Open brentonhouse opened 4 years ago
@ewanharris - Is this PR waiting on anything? LiveView doesn't work without it if you use npm modules at all.
@brentonhouse, I just haven't had time to review it yet. I gave preference to Ebenezer's PRs as he will be finishing on our team at the start of next week and I wanted to get him some product development before switching.
What ticket is this PR associated with?
associated with: https://jira.appcelerator.org/browse/TIMOB-27206
@brentonhouse I've been trying this out in classic and there seems to be some issues around requiring files. If I create Resources/test.js
and then do require('test')
an error gets thrown, but require('test.js')
works ok.
However if I then rebuild require('test')
will work just fine, I'm guessing this is down to the on-device lookup that's performed in the liveview runtime and there being a difference in what gets sent to the liveview server.
I haven't tested yet but I'm going to guess that'll extend to alloy libs too
@ewanharris - I have had to change this around significantly in order for it to work with all the latest code. I ended up just doing the changes in the combined file instead of the split code files so I would work faster and test things easier. I would have to back track this to each of the separate files unless we are finally ready to get rid of those.
@brentonhouse, I think I'm fine with removing the multiple files + concat build process. However I don't think it should be done in this PR as it would just add a ton of noise and make it difficult to review the require resolution changes
@brentonhouse, if you want. Send me the build/liveview.js
you have that's working and I can work on applying the changes back to the right places
There are several areas that I need to investigate to improve performance of this. Right now, it is checking to see if a file exists but is having to do it multiple times for each request because it doesn't know what files exists. I need to get access to (or create) a cache of JS files and native modules so that LiveView can just check this instead of the more time consuming check I implemented.