Socket
Socket
Sign inDemoInstall

@types/webpack

Package Overview
Dependencies
77
Maintainers
1
Versions
183
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/webpack

TypeScript definitions for webpack


Version published
Maintainers
1
Weekly downloads
5,141,510
decreased by-7.37%

Weekly downloads

Package description

What is @types/webpack?

The @types/webpack package provides TypeScript type definitions for Webpack, a static module bundler for modern JavaScript applications. This package is essential for developers working in TypeScript environments, ensuring type safety and enhancing the development experience by providing autocompletion and error checking for Webpack configurations and usage.

What are @types/webpack's main functionalities?

Configuration Type Checking

Enables TypeScript to perform type checking on Webpack configuration files. This ensures that the configuration adheres to the expected structure and types, reducing runtime errors.

{
  "compilerOptions": {
    "types": ["webpack"]
  }
}

Module Resolution

Provides types for defining Webpack configurations in TypeScript, allowing for autocompletion and type checking of configuration options.

import webpack from 'webpack';

const config: webpack.Configuration = {
  entry: './src/index.js',
  output: {
    filename: 'bundle.js',
    path: '/dist'
  }
};

Plugin and Loader Configuration

Facilitates the use of Webpack plugins and loaders with TypeScript by providing types for plugin and loader configurations, ensuring compatibility and correct usage.

import { DefinePlugin } from 'webpack';

const config: webpack.Configuration = {
  plugins: [
    new DefinePlugin({
      'process.env.NODE_ENV': JSON.stringify('production')
    })
  ]
};

Other packages similar to @types/webpack

Readme

Source

Installation

npm install --save @types/webpack

Summary

This package contains type definitions for webpack (https://github.com/webpack/webpack).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack.

Additional Details

  • Last updated: Mon, 29 Mar 2021 21:41:46 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Qubo, Benjamin Lim, Boris Cherny, Tommy Troy Lin, Mohsen Azimi, Jonathan Creamer, Alan Agius, Dennis George, Christophe Hurpeau, ZSkycat, John Reilly, Ryan Waskiewicz, Kyle Uehlein, Grgur Grisogono, Rubens Pinheiro Gonçalves Cavalcante, Anders Kaseorg, Felix Haus, Daniel Chin, Daiki Ihara, Dion Shi, Piotr Błażejewicz, and Michał Grzegorzewski.

FAQs

Last updated on 29 Mar 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc