chore: remove ResolverPlugin

This commit is contained in:
Benjamin Lim
2017-02-07 08:23:53 +08:00
parent dca6783921
commit f522cb689b
2 changed files with 0 additions and 43 deletions

23
webpack/index.d.ts vendored
View File

@@ -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;
}

View File

@@ -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);