Package Exports
- react-app-server-runtime
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-app-server-runtime) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-app-server-runtime
DEPRECATION WARNING: This is not maintained anymore, please use react-quickstart instead.
Node.js based runtime to evaluate client side code in. By default provides
minimalistic sandboxed runtime via vm Node's module.
Installation
% npm install react-app-server-runtimeUsage
Basic usage:
var evaluate = require('react-app-server-runtime');
evaluate('__callback(null, "hello!");', function(err, message) {
console.log(message); // outputs "hello!"
});More complex usage:
var evaluate = require('react-app-server-runtime');
var task = {
bundle: '...', // code bundle, built with browserify for example
code: '...', // some code to execute after bundle
debug: true // should we try to extract source maps from bundle
sourceMap: ... // or we can provide SourceMapConsumer directly
}
evaluate(task, function(err, message) {
console.log(message); // outputs "hello!"
});