rollup-plugin-reload
TypeScript icon, indicating that this package has built-in type declarations

4.0.3 • Public • Published

rollup-plugin-reload

a rollup plugin for server and reload

options

  • contentBase: default is process.cwd(); statically managed folders are required
  • port: default is 3000 port number
  • proxy: default is {}; such as { '/proxy': options }, the options reference https://github.com/chimurai/http-proxy-middleware#options
  • https: is enable https protocol, default is undefined, you can config as { key: 'xxx.key', cert: 'xxx.cert' }.
const { reload } = require('rollup-plugin-reload');
const path = require('path');

module.exports = {
  plugins: [reload({
    contentBase: path.resolve('debug'),
    port: 3000,
    proxy: {
      '/proxy': {
        target: 'http://api.com'
      }
    },
    https: {
      key: path.resolve(__dirname, 'xxx.key'),
      cert: path.resolve(__dirname, 'xxx.cert'),
    },
  })],
};

Package Sidebar

Install

npm i rollup-plugin-reload

Weekly Downloads

31

Version

4.0.3

License

ISC

Unpacked Size

19.5 kB

Total Files

13

Last publish

Collaborators

  • starry_smile