Skip to content

Commit 57c1d9e

Browse files
EugeneHlushkomontogeek
authored andcommitted
docs(migration): Create "Migrating" section and move content from Guides (#1948)
* docs(migrate) Create section. Move content * docs(migrate) Move redirect to plugin from config
1 parent a1e36d2 commit 57c1d9e

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

antwar.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ module.exports = () => ({
8585
layout: () => require('./src/components/Page/Page.jsx').default,
8686
content: () => require.context('./loaders/page-loader!./src/content/contribute', false, /^\.\/.*\.md$/),
8787
},
88+
migrate: {
89+
title: 'Migrate',
90+
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
91+
layout: () => require('./src/components/Page/Page.jsx').default,
92+
content: () => require.context('./loaders/page-loader!./src/content/migrate', false, /^\.\/.*\.md$/),
93+
},
8894
vote: () => require('./src/components/Vote/Vote.jsx').default,
8995
organization: () => require('./src/components/Organization/Organization.jsx').default,
9096
'starter-kits': () => require('./src/components/StarterKits/StarterKits.jsx').default,

src/components/Navigation/Links.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
{ "title": "API", "url": "api" },
99
{ "title": "Guides", "url": "guides" },
1010
{ "title": "Loaders", "url": "loaders" },
11-
{ "title": "Plugins", "url": "plugins" }
11+
{ "title": "Plugins", "url": "plugins" },
12+
{ "title": "Migrate", "url": "migrate" }
1213
]
1314
},
1415
{

src/content/guides/migrating.md src/content/migrate/3.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Migrating Versions
3-
sort: 15
2+
title: To webpack v2, v3
3+
sort: 1
44
contributors:
55
- sokra
66
- jhnns
@@ -14,14 +14,13 @@ contributors:
1414
- howdy39
1515
- selbekk
1616
- ndelangen
17+
- EugeneHlushko
1718
---
1819

1920
The following sections describe the major changes from webpack 1 to 2.
2021

2122
T> Note that there were far fewer changes between 2 and 3, so that migration shouldn't be too bad. If you are running into issues, please see [the changelog](https://github.com/webpack/webpack/releases) for details.
2223

23-
W> This content may be moved to the blog post in the near future as version 2 has been out for a while. On top of that, version 3 was recently released and version 4 is on the horizon. As noted above, folks should instead to refer to [the changelog](https://github.com/webpack/webpack/releases) for migrations.
24-
2524

2625
## `resolve.root`, `resolve.fallback`, `resolve.modulesDirectories`
2726

src/content/migrate/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Migrate
3+
sort: 1
4+
contributors:
5+
- EugeneHlushko
6+
---
7+
8+
This section contains information about migrating from older versions of webpack to newer ones.

webpack.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ module.exports = (env) => ({
119119
'development/release-process': '/contribute/release-process/',
120120
'development/how-to-write-a-loader': '/contribute/writing-a-loader/',
121121
'development/how-to-write-a-plugin': '/contribute/writing-a-plugin/',
122+
'migrating': '/migrate/3/',
122123
},
123124
}),
124125
]

0 commit comments

Comments
 (0)