This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
@launch/entry with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Plugin for Launch.js to add a client/server entrypoint.
Useful for scenarios where other plugins don't set an entrypoint.
import App from "@launch/app"; import EntryPlugin from "@launch/entry"; void new App() .plugin( new EntryPlugin() .client(require.resolve("./path/to/clientEntry.tsx")) .server(require.resolve("./path/to/serverEntry.tsx")) ) .launch()
Set the absolute path to the server entrypoint.
Set the absolute path to the client entrypoint.
When passing a file string to either the
.client() methods, give an absolute path.
The simplest way to do this is to use
require.resolve(), which will first resolve relative to the source file that calls the method, and will return the fully qualified path on disk.