1
1
import fs from "fs" ;
2
2
import webpack from "webpack" ;
3
- import rehypeSlug from ' rehype-slug' ;
4
- import remarkGfm from ' remark-gfm' ;
5
- import remarkComment from ' remark-comment' ;
6
- import remarkFrontmatter from ' remark-frontmatter'
3
+ import rehypeSlug from " rehype-slug" ;
4
+ import remarkGfm from " remark-gfm" ;
5
+ import remarkComment from " remark-comment" ;
6
+ import remarkFrontmatter from " remark-frontmatter" ;
7
7
import remarkMdxFrontmatter from "remark-mdx-frontmatter" ;
8
- import { createLoader } from ' simple-functional-loader'
8
+ import { createLoader } from " simple-functional-loader" ;
9
9
10
- const bsconfig = JSON . parse ( fs . readFileSync ( "./bsconfig.json" ) )
10
+ const bsconfig = JSON . parse ( fs . readFileSync ( "./bsconfig.json" ) ) ;
11
11
12
12
const { ProvidePlugin } = webpack ;
13
13
@@ -46,10 +46,10 @@ const config = {
46
46
function mainMdxLoader ( plugins ) {
47
47
return [
48
48
createLoader ( function ( source ) {
49
- const result = `${ source } \n\nMDXContent.frontmatter = frontmatter`
50
- return result
49
+ const result = `${ source } \n\nMDXContent.frontmatter = frontmatter` ;
50
+ return result ;
51
51
} ) ,
52
- ]
52
+ ] ;
53
53
}
54
54
55
55
config . module . rules . push ( {
@@ -61,18 +61,22 @@ const config = {
61
61
test : / \. m d x ? $ / ,
62
62
use : [
63
63
{
64
- loader : ' @mdx-js/loader' ,
64
+ loader : " @mdx-js/loader" ,
65
65
/** @type {import('@mdx-js/loader').Options } */
66
66
options : {
67
- remarkPlugins : [ remarkComment , remarkGfm , remarkFrontmatter , remarkMdxFrontmatter ] ,
68
- providerImportSource : '@mdx-js/react' ,
69
- rehypePlugins : [ rehypeSlug ]
70
- }
71
- }
72
- ]
67
+ remarkPlugins : [
68
+ remarkComment ,
69
+ remarkGfm ,
70
+ remarkFrontmatter ,
71
+ remarkMdxFrontmatter ,
72
+ ] ,
73
+ providerImportSource : "@mdx-js/react" ,
74
+ rehypePlugins : [ rehypeSlug ] ,
75
+ } ,
76
+ } ,
77
+ ] ,
73
78
} ) ;
74
79
75
-
76
80
config . plugins . push ( new ProvidePlugin ( { React : "react" } ) ) ;
77
81
return config ;
78
82
} ,
@@ -88,11 +92,16 @@ const config = {
88
92
destination : "/blog/bucklescript-is-rebranding" ,
89
93
permanent : true ,
90
94
} ,
95
+ {
96
+ source : "/docs/manual/latest/migrate-from-bucklescript-reason" ,
97
+ destination : "/docs/manual/v10.0.0/migrate-from-bucklescript-reason" ,
98
+ permanent : true ,
99
+ } ,
91
100
] ;
92
101
} ,
93
102
} ;
94
103
95
104
export default {
96
105
transpilePackages : transpileModules ,
97
- ...config
98
- }
106
+ ...config ,
107
+ } ;
0 commit comments