@types/webpack-node-externals
- Version 3.0.4
- Published
- 5.61 kB
- 2 dependencies
- MIT license
Install
npm i @types/webpack-node-externals
yarn add @types/webpack-node-externals
pnpm add @types/webpack-node-externals
Overview
TypeScript definitions for webpack-node-externals
Index
Functions
function webpackNodeExternals
webpackNodeExternals: (options?: webpackNodeExternals.Options) => ExternalItem;
Interfaces
interface ModulesFromFileType
interface ModulesFromFileType {}
interface Options
interface Options {}
property additionalModuleDirs
additionalModuleDirs?: string[] | undefined;
Additional folders to look for node modules.
property allowlist
allowlist?: AllowlistOption[] | AllowlistOption | undefined;
An array for the externals to allow, so they will be included in the bundle. Can accept exact strings ('module_name'), regex patterns (/^module_name/), or a function that accepts the module name and returns whether it should be included. Important - if you have set aliases in your webpack config with the exact same names as modules in node_modules, you need to allowlist them so Webpack will know they should be bundled. []
property binaryDirs
binaryDirs?: string[] | undefined;
['.bin']
property importType
importType?: | 'var' | 'this' | 'commonjs' | 'amd' | 'umd' | 'module' | ImportTypeCallback | undefined;
The method in which unbundled modules will be required in the code. Best to leave as 'commonjs' for node modules. 'commonjs'
property includeAbsolutePaths
includeAbsolutePaths?: boolean | undefined;
false
property modulesDir
modulesDir?: string | undefined;
The folder in which to search for the node modules. 'node_modules'
property modulesFromFile
modulesFromFile?: boolean | ModulesFromFileType | undefined;
Read the modules from the package.json file instead of the node_modules folder. false
Type Aliases
type AllowlistFunctionType
type AllowlistFunctionType = (moduleName: string) => boolean;
a function that accepts the module name and returns whether it should be included
type AllowlistOption
type AllowlistOption = string | RegExp | AllowlistFunctionType;
type ImportTypeCallback
type ImportTypeCallback = (moduleName: string) => string;
Package Files (1)
Dependencies (2)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/webpack-node-externals
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/webpack-node-externals)
- HTML<a href="https://www.jsdocs.io/package/@types/webpack-node-externals"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2677 ms. - Missing or incorrect documentation? Open an issue for this package.