Name: metalsmith-webpack-dev-server
Owner: Department of Veterans Affairs
Description: null
Created: 2017-04-21 17:22:59.0
Updated: 2017-04-21 17:45:57.0
Pushed: 2017-04-21 17:45:55.0
Homepage: null
Size: 31
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A metalsmith plugin to start webpack-dev-server to use in development. Best used together with metalsmith-webpack.
$ npm install metalsmith-webpack-dev-server
metalsmith = require('metalsmith');
webpackDevServer = require('metalsmith-webpack-dev-server');
webpackConfig = require('./webpack.config.js');
lsmith(__dirname)
se(webpackDevServer(webpackConfig))
uild(function(err) {
if (err) { throw err; }
;
This will start webpack-dev-server on localhost:8081 using default configuration. Pass webpack-dev-server options as a second argument.
metalsmith = require('metalsmith');
webpackDevServer = require('metalsmith-webpack-dev-server');
webpackConfig = require('./webpack.config.js');
lsmith(__dirname)
se(webpackDevServer(webpackConfig, {
hot: true, // Enable HMR
proxy: {
'*': 'http://localhost:8080'
},
// webpack-dev-middleware options
quiet: true,
noInfo: true,
publicPath: 'http://localhost:8081/',
stats: {colors: true}
)
uild(function(err) {
if (err) { throw err; }
;
For more information about webpack-dev-server options see: https://webpack.github.io/docs/webpack-dev-server.html
Type: Object
Your webpack config. See the [webpack configuration][webpack configuration] documentation for details.
Type: Object
webpack-dev-server options. See https://webpack.github.io/docs/webpack-dev-server.html for details.
MIT