Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Webpack ¶
type Webpack struct { // Path to Webpack binary BinPath string // Root dir to start webpack from RootDir string // Port for webpack to serve assets from Port int // contains filtered or unexported fields }
Webpack is used to start and stop a webpack dev server instance. It can be used with medium/pkg/medium via the Middleware method, serving assets from the /assets path in the target application.
func (*Webpack) Middleware ¶
func (w *Webpack) Middleware() medium.Middleware
Middleware accepts a logger and returns a middleware that can be used in conjunction with medium.Use.
The middleware expects for webpack to be executable in the current working directory.
This is not intended for production use, just for development.
Click to show internal directories.
Click to hide internal directories.