This repository has been archived by the owner on Jan 7, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #483 from Yancey-Blog/feature/upgrade-next-to-11
Feature/upgrade next to 11
- Loading branch information
Showing
19 changed files
with
311 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
next-env.d.ts | ||
|
||
shims-env.d.ts | ||
ecosystem.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,3 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> | ||
|
||
declare module '*.bmp' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.gif' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.jpg' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.jpeg' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.png' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.svg' { | ||
import { SFC, SVGProps } from 'react' | ||
|
||
export const ReactComponent: SFC<SVGProps<SVGSVGElement>> | ||
|
||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.cur' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module 'aplayer' { | ||
interface Audio { | ||
name: string | ||
url: string | ||
cover: string | ||
lrc: string | ||
} | ||
interface Props { | ||
container: HTMLElement | ||
lrcType: number | ||
fixed: boolean | ||
audio: Audio[] | ||
} | ||
class APlayer { | ||
constructor({ container, lrcType, fixed, audio }: Props) {} | ||
public lrc: { show: Function } | ||
} | ||
|
||
export default APlayer | ||
} | ||
|
||
interface Window { | ||
ga: Function | ||
GA_INITIALIZED: boolean | ||
} | ||
|
||
declare namespace NodeJS { | ||
export interface ProcessEnv { | ||
NEXT_PUBLIC_API_URL: string | ||
NEXT_PUBLIC_DOMAIN_URL: string | ||
NEXT_PUBLIC_STATIC_FILE_URL: string | ||
NEXT_PUBLIC_GA_KEY: string | ||
NEXT_PUBLIC_SENTRY_DSN: string | ||
NEXT_PUBLIC_HOTJAR_ID: string | ||
NEXT_PUBLIC_HOTJAR_SV: string | ||
NEXT_PUBLIC_DISCUSSION_KEY: string | ||
NEXT_PUBLIC_ALGOLIA_SEARCH_APP_ID: string | ||
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY: string | ||
NEXT_PUBLIC_ALGOLIA_SEARCH_INDEX_NAME: string | ||
} | ||
} | ||
|
||
declare const __YANCEY_BLOG_VERSION__: string | ||
declare const __GIT_HASH__: string | ||
/// <reference types="next/image-types/global" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
const withSourceMaps = require('@zeit/next-source-maps') | ||
const withBundleAnalyzer = require('@next/bundle-analyzer')({ | ||
enabled: process.env.ANALYZE === 'true', | ||
}) | ||
|
||
module.exports = (phase, { defaultConfig }) => | ||
withBundleAnalyzer( | ||
withSourceMaps({ | ||
compress: true, | ||
pageExtensions: ['mdx', 'jsx', 'js', 'ts', 'tsx'], | ||
future: { | ||
webpack5: true, | ||
}, | ||
webpack: ( | ||
config, | ||
{ buildId, dev, isServer, defaultLoaders, webpack }, | ||
) => { | ||
config.module.rules.push({ | ||
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.webp$/, /\.cur$/], | ||
use: [ | ||
{ | ||
loader: 'url-loader', | ||
}, | ||
], | ||
}) | ||
withBundleAnalyzer({ | ||
compress: true, | ||
pageExtensions: ['mdx', 'jsx', 'js', 'ts', 'tsx'], | ||
productionBrowserSourceMaps: true, | ||
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => { | ||
config.module.rules.push({ | ||
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.webp$/, /\.cur$/], | ||
use: [ | ||
{ | ||
loader: 'url-loader', | ||
}, | ||
], | ||
}) | ||
|
||
return config | ||
}, | ||
}), | ||
) | ||
return config | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
declare module '*.bmp' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.gif' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.jpg' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.jpeg' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.png' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.svg' { | ||
import { SFC, SVGProps } from 'react' | ||
|
||
export const ReactComponent: SFC<SVGProps<SVGSVGElement>> | ||
|
||
const src: string | ||
export default src | ||
} | ||
|
||
declare module '*.cur' { | ||
const src: string | ||
export default src | ||
} | ||
|
||
declare module 'aplayer' { | ||
interface Audio { | ||
name: string | ||
url: string | ||
cover: string | ||
lrc: string | ||
} | ||
interface Props { | ||
container: HTMLElement | ||
lrcType: number | ||
fixed: boolean | ||
audio: Audio[] | ||
} | ||
class APlayer { | ||
constructor({ container, lrcType, fixed, audio }: Props) {} | ||
public lrc: { show: Function } | ||
} | ||
|
||
export default APlayer | ||
} | ||
|
||
interface Window { | ||
ga: Function | ||
GA_INITIALIZED: boolean | ||
} | ||
|
||
declare namespace NodeJS { | ||
export interface ProcessEnv { | ||
NEXT_PUBLIC_API_URL: string | ||
NEXT_PUBLIC_DOMAIN_URL: string | ||
NEXT_PUBLIC_STATIC_FILE_URL: string | ||
NEXT_PUBLIC_GA_KEY: string | ||
NEXT_PUBLIC_SENTRY_DSN: string | ||
NEXT_PUBLIC_HOTJAR_ID: string | ||
NEXT_PUBLIC_HOTJAR_SV: string | ||
NEXT_PUBLIC_DISCUSSION_KEY: string | ||
NEXT_PUBLIC_ALGOLIA_SEARCH_APP_ID: string | ||
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY: string | ||
NEXT_PUBLIC_ALGOLIA_SEARCH_INDEX_NAME: string | ||
} | ||
} | ||
|
||
declare const __YANCEY_BLOG_VERSION__: string | ||
declare const __GIT_HASH__: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.