javascript - Unable to create working custom transformer -


as advised in https://github.com/facebook/react-native/issues/393#issuecomment-173247497, have created custom transformer unable make work.

transformer:

var transformer = require('react-native/packager/transformer'); var fs = require("fs");  module.exports = function (data, callback) {     if (data.filename.indexof("index.android.js") !== -1) {         callback({             code: data.sourcecode,             map: json.parse(fs.readfilesync("./index.android.js.map").tostring()),             filename: data.filename         })     } else {         transformer(data, callback);     } }; 

repro:


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -