0.0.2 • Published 7 years ago

rollup-plugin-serve-bq v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Rollup plugin to serve the bundle

Usage

// rollup.config.js
import serve from 'rollup-plugin-serve'

export default {
  entry: 'entry.js',
  dest: 'bundle.js',
  plugins: [
    serve('dist')
  ]
}

Options

By default it serves the current project folder. Change it by passing a string:

serve('public')    // will be used as contentBase

// Default options
serve({
  // Launch in browser (default: false)
  open: true,

  // Show server address in console (default: true)
  verbose: false,

  // Folder to serve files from
  contentBase: '',

  // Multiple folders to serve from
  contentBase: ['dist', 'static'],

  // Set to true to return index.html instead of 404
  historyApiFallback: false,

  // Options used in setting up server
  host: 'localhost',
  port: 10001
})

master

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Contributions and feedback are very welcome.

To get it running: 1. Clone the project. 2. npm install 3. npm run build

Credits

License

The MIT License (MIT). Please see License File for more information.

为什么要fork

增加 index 入口指定

0.0.2

7 years ago

0.0.1

7 years ago