import ProjextWebpackOpenDevServer from 'projext-plugin-webpack/src/plugins/openDevServer/index.js'
ProjextWebpackOpenDevServer
This is a webpack plugin that works as a tiny helper for the dev server: It logs clear messages
when the bundle isbeing created, when it's available, in which URL and it even opens the
browser.
The reason it was created was because the dev server log messages are hard to find and,
depending on the settings, when the dev server opens the browser, you can end up on
/webpack-dev-server
.
Constructor Summary
Public Constructor | ||
public |
constructor(url: string, options: ProjextWebpackOpenDevServerOptions) |
Method Summary
Public Methods | ||
public |
This is called by webpack when the plugin is being processed. |
|
public |
Gets the plugin options. |
|
public |
Gets the dev server URL. |
Public Constructors
public constructor(url: string, options: ProjextWebpackOpenDevServerOptions) source
Params:
Name | Type | Attribute | Description |
url | string | The dev server URL. |
|
options | ProjextWebpackOpenDevServerOptions |
|
Settings to customize the plugin behaviour. |
Throw:
If |
Public Methods
public apply(compiler: Object) source
This is called by webpack when the plugin is being processed. The method takes care of adding the required listener to the webpack hooks in order to log the information messages and open the browser..
Params:
Name | Type | Attribute | Description |
compiler | Object | The compiler information provided by webpack. |