webpack-httpolyglot-server
Using httpolyglot to serve http/https over the same port for Webpack development server
Why?
The React Chrome Extension Boilerplate need a https webpack server on development mode (Inject page), and we also need http for Window, Popup, Background features, I just don't want to open two webpack servers for that, so I made a tool, provide a easy way to achieve.
Installation
$ npm i --save-dev webpack-hot-middleware$ npm i --save-dev webpack-httpolyglot-server
Usage
CLI
Not yet.
Node
var createWebpackServer = ; const server = ;
The config
can be Array, it can use multiple config.
Configuration
output.publicPath
Use //
as a prefix instead of http://
or https://
, but if you're making chrome extension (prefix: chrome-extension://
), it's not applicable.
webpack-hot-middleware
entry
This tool used webpack-hot-middleware
for enable hot module replacement.
devMiddleware
Apply webpack-dev-middleware options.
hotMiddleware
Apply webpack-hot-middleware options.
Credits
- The SSL keys is copied from webpack-dev-server.