
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
metalsmith-webpack-dev-server
Advanced tools
A metalsmith plugin to start webpack-dev-server to use in development.
$ npm install metalsmith-webpack-dev-server
var metalsmith = require('metalsmith');
var webpackDevServer = require('metalsmith-webpack-dev-server');
var webpackConfig = require('./webpack.config.js');
metalsmith(__dirname)
.use(webpackDevServer(webpackConfig))
.build(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.
var metalsmith = require('metalsmith');
var webpackDevServer = require('metalsmith-webpack-dev-server');
var webpackConfig = require('./webpack.config.js');
metalsmith(__dirname)
.use(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}
}))
.build(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
FAQs
Starts webpack dev server when running metalsmith
We found that metalsmith-webpack-dev-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.