Skip to content

holium/vite-plugin-urbit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-plugin-urbit

A plugin to setup proxying to a running Urbit on a vite devserver correctly. The plugin also inserts the correct script tags, so that window.ship and window.desk are loaded correctly

Usage

import urbitPlugin from '@holium/vite-plugin-urbit';
// rest of config
plugins: [
  urbitPlugin({
    base: 'bitcoin',
    target: 'http://localhost:8080',
  }),
];

The configuration object is defined as so.

export interface UrbitPluginConfig {
  /**
   * The base that this app will be served at. This should be the same
   * as the `base` property on the docket file
   */
  base: string;
  /**
   * URL of urbit to proxy requests to
   *
   * @example `"http://localhost:8080"`
   */
  target: string;
}

About

A plugin to setup proxying from a vite devserver to an Urbit ship

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 93.9%
  • JavaScript 6.1%