One of the uses for native code that I have is to enable tests to use static json data (that is my code accesses via http). An idea I found to make it available for testing was
var _user$project$Native_TestJson = function () {
var fs = require('fs');
var path = require('path');
var jsonPath = path.join(__dirname, '../../../..', 'src/assets/data/primitives.json');
var getPrimitives = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
return {
getPrimitives: getPrimitives
}
}();
This works great, but I’m wondering how this need is supported in 0.19?