Skip to content

Commit 9ef9449

Browse files
authored
Merge pull request #285 from timlrx/upgrade/preact
update nextjs, preact, mdx-bundler, esbuild
2 parents 4b30668 + 1789efa commit 9ef9449

File tree

6 files changed

+2497
-2056
lines changed

6 files changed

+2497
-2056
lines changed

.eslintrc.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,10 @@ module.exports = {
66
node: true,
77
es6: true,
88
},
9-
extends: [
10-
'eslint:recommended',
11-
'plugin:jsx-a11y/recommended',
12-
'plugin:prettier/recommended',
13-
'next',
14-
'next/core-web-vitals',
15-
],
9+
extends: ['eslint:recommended', 'plugin:prettier/recommended', 'next', 'next/core-web-vitals'],
1610
rules: {
1711
'prettier/prettier': 'error',
1812
'react/react-in-jsx-scope': 'off',
19-
'jsx-a11y/anchor-is-valid': [
20-
'error',
21-
{
22-
components: ['Link'],
23-
specialLink: ['hrefLeft', 'hrefRight'],
24-
aspects: ['invalidHref', 'preferButton'],
25-
},
26-
],
2713
'react/prop-types': 0,
2814
'no-unused-vars': 0,
2915
'react/no-unescaped-entities': 0,

data/blog/github-markdown-guide.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,18 @@ function fancyAlert(arg) {
153153
}
154154
```
155155

156+
## Footnotes
157+
158+
```
159+
Here is a simple footnote[^1]. With some additional text after it.
160+
161+
[^1]: My reference.
162+
```
163+
164+
Here is a simple footnote[^1]. With some additional text after it.
165+
166+
[^1]: My reference.
167+
156168
## Task Lists
157169

158170
```

lib/mdx.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export async function getFileBySlug(type, slug) {
5656

5757
// Parsing frontmatter here to pass it in as options to rehype plugin
5858
const { data: frontmatter } = matter(source)
59-
const { code } = await bundleMDX(source, {
59+
const { code } = await bundleMDX({
60+
source,
6061
// mdx imports can be automatically source from the components directory
6162
cwd: path.join(root, 'components'),
6263
xdmOptions(options) {

next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module.exports = withBundleAnalyzer({
3030
if (!dev && !isServer) {
3131
// Replace React with Preact only in client production build
3232
Object.assign(config.resolve.alias, {
33+
'react/jsx-runtime.js': 'preact/compat/jsx-runtime',
3334
react: 'preact/compat',
3435
'react-dom/test-utils': 'preact/test-utils',
3536
'react-dom': 'preact/compat',

0 commit comments

Comments
 (0)