npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

@launch/entry

1.7.0 • Public • Published

🚀 Launch.js - Simple client/server entry plugin

Build Status npm license

Plugin for Launch.js to add a client/server entrypoint.

Useful for scenarios where other plugins don't set an entrypoint.

Usage

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()

Methods

server(file: string)

Set the absolute path to the server entrypoint.

client(file: string)

Set the absolute path to the client entrypoint.

Setting the file path

When passing a file string to either the .server() or .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.

License

MIT

install

npm i @launch/entry

Downloadsweekly downloads

1

version

1.7.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability