Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf545f7

Browse files
committed
change readme
1 parent211f2d1 commitbf545f7

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

‎next.config.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ module.exports = () =>
5050
},
5151
],
5252
navigationPreload:true,
53-
// globPatterns: ['app/static/**/*', 'app/_next/static/**/*'],
54-
// modifyURLPrefix: {
55-
// app: LINK_PREFIX,
56-
// },
5753
// publicExcludes: [],
5854
// exclude: ['**/node_modules/**/*'],
5955
},

‎readme.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@
342342
const prodAssetPrefix ='/{folder}';
343343
module.exports = () => ({
344344
env: {
345-
ENV: process.env.NODE_ENV,
346345
LINK_PREFIX: isProd? prodAssetPrefix:'';
347346
},
348347
assetPrefix: isProd? prodAssetPrefix:'';,
@@ -352,14 +351,16 @@
352351
```tsx
353352
import React from'react';
354353
import Link from'next/link';
354+
import { join } from'path';
355355
356356
const linkPrefix = process.env.LINK_PREFIX;
357357
358-
const PrefixedLink: React.FC<Link['props']> = ({
358+
const PrefixedLink: React.FC<PrefixedLinkProps> = ({
359359
href,
360360
as = href,
361+
linkPrefix = LINK_PREFIX,
361362
...props
362-
}) =><Link href={href} as={`${linkPrefix}${as}`} {...props} />;
363+
}) =><Link href={href} as={join(linkPrefix,as.toString())} {...props} />;
363364
364365
export default PrefixedLink;
365366
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp