rollup-plugin-server-io

Rollup wrapper for server-io-core with dev server, debugger and reload all in one

Usage no npm install needed!

<script type="module">
  import rollupPluginServerIo from 'https://cdn.skypack.dev/rollup-plugin-server-io';
</script>

README

rollup-plugin-server-io

All-in-one dev server solution, with live reload, debugger, http proxy and a whole lot more.

Installation

$ npm install rollup-plugin-server-io --save-dev

or using yarn

$ yarn add rollup-plugin-server-io --dev

Try it

Clone this repo, run install, then npm run demo. The code is in the tests/fixtures folder, have fun.

Example

import rollup from 'rollup';
import serverIo from 'rollup-plugin-server-io'
import { join } from 'path'

let config = {
  input: './src/main.js',
  output: {
    file: './www/js/app.js',
    format: 'umd',
    name: 'App',
    sourcemap: true
  },
  plugins: [
    serverIo({
      // The only required field
      webroot: [
        join(__dirname, 'dist'),
        join(__dirname, 'assets')
      ],
    })
  ]
}

export default config

When you run rollup, it will automatically open your browser and point to your dev site.

Configratuion

For full configuration options, please visit server-io-core project page.


MIT - NEWBRAN LTD OPEN SOURCE / Joel Chu