@gluons/vue-pack-dev
v1.20.3
Published
A development server for vue-pack (and vue-up).
Downloads
191
Maintainers
Readme
vue-pack-dev
A development server for vue-pack (and vue-up).
Using webpack-dev-server under the hood.
Installation
npm install --save-dev @gluons/vue-pack-dev
# or
yarn add --dev @gluons/vue-pack-dev
Usage
const serve = require('@gluons/vue-pack-dev').default;
serve({
entry: '<path to your entry file>'
})
.then(() => {
console.log('Server is running.');
})
.catch(err => {
console.error(err);
});
Options
entry
Type: string
Required
Path to entry file for development.
alias
Type: { [key: string]: string }
Alias to path.
See webpack's
resolve.alias
.
define
Type: { [key: string]: any }
Define global constants which can be configured at compile time by webpack's DefinePlugin.
port
Type: number
Default: 8080
Port of development server.
open
Type: boolean
Default: true
Open in browser when server run.
htmlTitle
Type: string
Default: Vue Library
Title of development page.
webpackBarName
Type: string
Default: Vue Pack Dev
Name of progress bar of WebpackBar.
API
serve(options)
Return: Promise<void>
Run development server.
options
Type: Options
Options.