Socket
Socket
Sign inDemoInstall

@types/webpack-dev-server

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/webpack-dev-server

TypeScript definitions for webpack-dev-server


Version published
Weekly downloads
426K
decreased by-9.11%
Maintainers
1
Weekly downloads
 
Created

What is @types/webpack-dev-server?

@types/webpack-dev-server provides TypeScript type definitions for the webpack-dev-server package, which is a development server that provides live reloading and other features for a better development experience with webpack.

What are @types/webpack-dev-server's main functionalities?

Live Reloading

Enables hot module replacement and live reloading, allowing changes to be applied without a full page reload.

const config: WebpackDevServer.Configuration = {
  hot: true,
  liveReload: true
};

Proxying API Requests

Proxies API requests to another server, useful for separating frontend and backend development.

const config: WebpackDevServer.Configuration = {
  proxy: {
    '/api': 'http://localhost:3000'
  }
};

Custom Middleware

Allows the addition of custom middleware to the development server, enabling custom request handling.

const config: WebpackDevServer.Configuration = {
  before(app) {
    app.use((req, res, next) => {
      console.log('Request URL:', req.url);
      next();
    });
  }
};

Static File Serving

Serves static files from a specified directory, useful for serving assets like images and fonts.

const config: WebpackDevServer.Configuration = {
  static: {
    directory: path.join(__dirname, 'public'),
  }
};

Other packages similar to @types/webpack-dev-server

FAQs

Package last updated on 06 Feb 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc