How to use the json.es function in json

To help you get started, we’ve selected a few json examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fusepilot / extend-script-loader / plugin.js View on Github external
compiler.plugin('emit', function(compilation, callback) {

    var interface = fs.readFileSync(path.join(__dirname, './lib/CSInterface.js'))
    var json = fs.readFileSync(path.join(__dirname, './lib/JSON.es'))

    compilation.assets['interface.es'] = {
      source: function() {
        return interface.toString();
      },
      size: function() {
        return 1;
      }
    };

    compilation.assets['json.es'] = {
      source: function() {
        return json.toString();
      },
      size: function() {
        return 1;
      }
    };

    callback();
  });
};