@shuvi/electron-plugin

Enable electron support for shuvi.

Usage no npm install needed!

<script type="module">
  import shuviElectronPlugin from 'https://cdn.skypack.dev/@shuvi/electron-plugin';
</script>

README

@shuvi/electron-plugin

Enable electron support for shuvi.

How to use

  1. Install the package.
    yarn add -D @shuvi/electron-plugin
    
  2. You need to provide a environment variable for apollo.
     APOLLO_HOST=xxx shuvi-electron start
    

CLI Options

  • start - start the electron in development mode

     Env:
      APOLLO_HOST  apollo url
    
     Flags:
      --host  hostname
      --port  port
    
  • build - bundle project in production mode.

     Env:
      APOLLO_HOST    apollo url
      OUTPUT_PATH    path to output path. (optional)
    
  • preview - bundle project in produciton mode and preview it

     Env:
      APOLLO_HOST    apollo url