Package Exports
- rollup-plugin-serve
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rollup-plugin-serve) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Rollup plugin to serve the bundle
Installation
npm install --save-dev rollup-plugin-serveUsage
// 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:
- Clone the project.
npm installnpm run build
Credits
License
The MIT License (MIT). Please see License File for more information.