leafage
Version:
The React Server Side Render Framework
48 lines (44 loc) • 1.36 kB
JavaScript
/**
* leafage v1.3.1
*
* Copyright (c) Leafage.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
;
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.js');
var toolkit = require('@leafage/toolkit');
var server = require('@leafage/server');
var rspack = require('@leafage/rspack');
var utils = require('../common/utils.js');
var dev = /*#__PURE__*/function () {
var _ref = _rollupPluginBabelHelpers.asyncToGenerator(/*#__PURE__*/_rollupPluginBabelHelpers.regenerator().m(function _callee() {
var options,
opt,
context,
server$1,
_args = arguments;
return _rollupPluginBabelHelpers.regenerator().w(function (_context) {
while (1) switch (_context.n) {
case 0:
options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
opt = toolkit.getConfig(options);
context = utils.createContext(opt);
server$1 = server.createServer(context);
_context.n = 1;
return rspack.bundle(context);
case 1:
server$1.start();
case 2:
return _context.a(2);
}
}, _callee);
}));
return function dev() {
return _ref.apply(this, arguments);
};
}();
exports.dev = dev;