UNPKG

leafage

Version:

The React Server Side Render Framework

46 lines (43 loc) 1.3 kB
/** * 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 */ import { asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../_virtual/_rollupPluginBabelHelpers.js'; import { getConfig } from '@leafage/toolkit'; import { createServer } from '@leafage/server'; import { bundle } from '@leafage/rspack'; import { createContext } from '../common/utils.js'; var dev = /*#__PURE__*/function () { var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() { var options, opt, context, server, _args = arguments; return _regenerator().w(function (_context) { while (1) switch (_context.n) { case 0: options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}; opt = getConfig(options); context = createContext(opt); server = createServer(context); _context.n = 1; return bundle(context); case 1: server.start(); case 2: return _context.a(2); } }, _callee); })); return function dev() { return _ref.apply(this, arguments); }; }(); export { dev };