@@ -6,6 +6,7 @@ const CleanPlugin = require('clean-webpack-plugin');
6
6
const CopyWebpackPlugin = require ( 'copy-webpack-plugin' ) ;
7
7
const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
8
8
const DirectoryTreePlugin = require ( 'directory-tree-webpack-plugin' ) ;
9
+ const RedirectWebpackPlugin = require ( 'redirect-webpack-plugin' ) ;
9
10
10
11
module . exports = ( env = { } ) => ( {
11
12
devtool : 'source-map' ,
@@ -127,6 +128,39 @@ module.exports = (env = {}) => ({
127
128
// TODO: Add directory (section) attributes and index url (if necessary)
128
129
}
129
130
}
131
+ } ) ,
132
+ new RedirectWebpackPlugin ( {
133
+ redirects : {
134
+ 'support' : '/contribute/' ,
135
+ 'writers-guide' : '/contribute/writers-guide/' ,
136
+ 'get-started' : '/guides/getting-started/' ,
137
+ 'get-started/install-webpack' : '/guides/installation/' ,
138
+ 'get-started/why-webpack' : '/guides/why-webpack/' ,
139
+ 'pluginsapi' : '/api/plugins/' ,
140
+ 'pluginsapi/compiler' : '/api/compiler-hooks/' ,
141
+ 'pluginsapi/template' : '/api/template/' ,
142
+ 'api/passing-a-config' : '/configuration/configuration-types/' ,
143
+ 'api/plugins/compiler' : '/api/compiler-hooks/' ,
144
+ 'api/plugins/compilation' : '/api/compilation/' ,
145
+ 'api/plugins/module-factories' : '/api/module-methods/' ,
146
+ 'api/plugins/parser' : '/api/parser/' ,
147
+ 'api/plugins/tapable' : '/api/tapable/' ,
148
+ 'api/plugins/template' : '/api/template/' ,
149
+ 'api/plugins/resolver' : '/api/resolver/' ,
150
+ 'development' : '/contribute/' ,
151
+ 'development/plugin-patterns' : '/contribute/plugin-patterns/' ,
152
+ 'development/release-process' : '/contribute/release-process/' ,
153
+ 'development/how-to-write-a-loader' : '/contribute/writing-a-loader/' ,
154
+ 'development/how-to-write-a-plugin' : '/contribute/writing-a-plugin/' ,
155
+ 'guides/code-splitting-import' : '/guides/code-splitting/' ,
156
+ 'guides/code-splitting-require' : '/guides/code-splitting/' ,
157
+ 'guides/code-splitting-async' : '/guides/code-splitting/' ,
158
+ 'guides/code-splitting-css' : '/guides/code-splitting/' ,
159
+ 'guides/code-splitting-libraries' : '/guides/code-splitting/' ,
160
+ 'guides/why-webpack' : '/comparison/' ,
161
+ 'guides/production-build' : '/guides/production/' ,
162
+ 'migrating' : '/migrate/3/'
163
+ } ,
130
164
} )
131
165
] ,
132
166
stats : {
0 commit comments