mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 02:57:24 +08:00
chore: remove ResolverPlugin
This commit is contained in:
23
webpack/index.d.ts
vendored
23
webpack/index.d.ts
vendored
@@ -515,10 +515,6 @@ declare namespace webpack {
|
||||
* This can boost performance. Try to profile the build first to determine clever prefetching points.
|
||||
*/
|
||||
PrefetchPlugin: PrefetchPluginStatic;
|
||||
/**
|
||||
* Apply a plugin (or array of plugins) to one or more resolvers (as specified in types).
|
||||
*/
|
||||
ResolverPlugin: ResolverPluginStatic;
|
||||
/**
|
||||
* Adds a banner to the top of each generated chunk.
|
||||
*/
|
||||
@@ -613,10 +609,6 @@ declare namespace webpack {
|
||||
AggressiveMergingPlugin: optimize.AggressiveMergingPluginStatic;
|
||||
}
|
||||
|
||||
interface DirectoryDescriptionFilePluginStatic {
|
||||
new (file: string, files: string[]): Plugin;
|
||||
}
|
||||
|
||||
interface NormalModuleReplacementPluginStatic {
|
||||
new (resourceRegExp: any, newResource: any): Plugin;
|
||||
}
|
||||
@@ -635,21 +627,6 @@ declare namespace webpack {
|
||||
new (request: any): Plugin;
|
||||
}
|
||||
|
||||
interface ResolverPluginStatic {
|
||||
new (plugins: Plugin[], files?: string[]): Plugin;
|
||||
DirectoryDescriptionFilePlugin: DirectoryDescriptionFilePluginStatic;
|
||||
/**
|
||||
* This plugin will append a path to the module directory to find a match,
|
||||
* which can be useful if you have a module which has an incorrect “main” entry in its package.json/bower.json etc (e.g. "main": "Gruntfile.js").
|
||||
* You can use this plugin as a special case to load the correct file for this module. Example:
|
||||
*/
|
||||
FileAppendPlugin: FileAppendPluginStatic;
|
||||
}
|
||||
|
||||
interface FileAppendPluginStatic {
|
||||
new (files: string[]): Plugin;
|
||||
}
|
||||
|
||||
interface BannerPluginStatic {
|
||||
new (banner: any, options: any): Plugin;
|
||||
}
|
||||
|
||||
@@ -32,18 +32,6 @@ rule = {
|
||||
query: { mimetype: "image/png" }
|
||||
};
|
||||
|
||||
//
|
||||
// https://webpack.github.io/docs/using-plugins.html
|
||||
//
|
||||
|
||||
configuration = {
|
||||
plugins: [
|
||||
new webpack.ResolverPlugin([
|
||||
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["main"])
|
||||
], ["normal", "loader"])
|
||||
]
|
||||
};
|
||||
|
||||
//
|
||||
// http://webpack.github.io/docs/tutorials/getting-started/
|
||||
//
|
||||
@@ -268,14 +256,6 @@ plugin = new webpack.IgnorePlugin(requestRegExp, contextRegExp);
|
||||
|
||||
plugin = new webpack.PrefetchPlugin(context, request);
|
||||
plugin = new webpack.PrefetchPlugin(request);
|
||||
plugin = new webpack.ResolverPlugin(plugins, types);
|
||||
plugin = new webpack.ResolverPlugin(plugins);
|
||||
plugin = new webpack.ResolverPlugin([
|
||||
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["main"])
|
||||
], ["normal", "loader"]);
|
||||
plugin = new webpack.ResolverPlugin([
|
||||
new webpack.ResolverPlugin.FileAppendPlugin(['/dist/compiled-moduled.js'])
|
||||
]);
|
||||
plugin = new webpack.BannerPlugin(banner, options);
|
||||
plugin = new webpack.optimize.DedupePlugin();
|
||||
plugin = new webpack.optimize.LimitChunkCountPlugin(options);
|
||||
|
||||
Reference in New Issue
Block a user