forked from tailwindlabs/tailwindcss.com
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtranslate.js
41 lines (41 loc) · 860 Bytes
/
translate.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
module.exports = () => {
return [
{
test: /Header\.js$/,
loader: "string-replace-loader",
options: {
search: "Components",
replace: "元件",
},
},
{
test: /\.mdx$/,
loader: "./file-replacer",
options: {
base: "./translated",
replacement: {
"editor-setup.mdx": "editor-setup.mdx",
},
},
},
{
test: /documentation\.js$/,
loader: "./file-replacer",
options: {
replacement: {
"documentation.js": "./translated/navs/documentation.js",
},
},
},
{
test: /components[\/+\\+]home[\/+\\+]\w*\.js$/,
loader: "./file-replacer",
options: {
base: "./translated/components/home",
replacement: {
"Hero.js": "Hero.js",
},
},
},
];
};