Remove next-typescript check in webpack config (#55819)
This package has been legacy for multiple years and has been marked deprecated, this check is no longer useful. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
This commit is contained in:
parent
dca5e22384
commit
b5c399698d
3 changed files with 2 additions and 41 deletions
|
@ -110,7 +110,6 @@
|
|||
"@typescript-eslint/parser": "6.1.0",
|
||||
"@vercel/fetch": "6.1.1",
|
||||
"@vercel/og": "0.5.15",
|
||||
"@zeit/next-typescript": "1.1.2-canary.0",
|
||||
"abort-controller": "3.0.0",
|
||||
"alex": "9.1.0",
|
||||
"amphtml-validator": "1.0.35",
|
||||
|
|
|
@ -3002,34 +3002,6 @@ export default async function getBaseWebpackConfig(
|
|||
attachReactRefresh(webpackConfig, defaultLoaders.babel)
|
||||
}
|
||||
|
||||
// check if using @zeit/next-typescript and show warning
|
||||
if (
|
||||
isNodeOrEdgeCompilation &&
|
||||
webpackConfig.module &&
|
||||
Array.isArray(webpackConfig.module.rules)
|
||||
) {
|
||||
let foundTsRule = false
|
||||
|
||||
webpackConfig.module.rules = webpackConfig.module.rules.filter(
|
||||
(rule): boolean => {
|
||||
if (!rule || typeof rule !== 'object') return true
|
||||
if (!(rule.test instanceof RegExp)) return true
|
||||
if (rule.test.test('noop.ts') && !rule.test.test('noop.js')) {
|
||||
// remove if it matches @zeit/next-typescript
|
||||
foundTsRule = rule.use === defaultLoaders.babel
|
||||
return !foundTsRule
|
||||
}
|
||||
return true
|
||||
}
|
||||
)
|
||||
|
||||
if (foundTsRule) {
|
||||
console.warn(
|
||||
`\n@zeit/next-typescript is no longer needed since Next.js has built-in support for TypeScript now. Please remove it from your ${config.configFileName} and your .babelrc\n`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Backwards compat for `main.js` entry key
|
||||
// and setup of dependencies between entries
|
||||
// we can't do that in the initial entry for
|
||||
|
|
|
@ -176,9 +176,6 @@ importers:
|
|||
'@vercel/og':
|
||||
specifier: 0.5.15
|
||||
version: 0.5.15
|
||||
'@zeit/next-typescript':
|
||||
specifier: 1.1.2-canary.0
|
||||
version: 1.1.2-canary.0(@babel/core@7.18.0)
|
||||
abort-controller:
|
||||
specifier: 3.0.0
|
||||
version: 3.0.0
|
||||
|
@ -4422,6 +4419,7 @@ packages:
|
|||
'@babel/plugin-syntax-typescript': 7.21.4(@babel/core@7.18.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@babel/plugin-transform-typescript@7.18.4(@babel/core@7.18.0):
|
||||
resolution: {integrity: sha512-l4vHuSLUajptpHNEOUDEGsnpl9pfRLsN1XUoDQDD/YBuXTM+v37SHGS+c6n4jdcZy96QtuUuSvZYMLSSsjH8Mw==}
|
||||
|
@ -4899,6 +4897,7 @@ packages:
|
|||
'@babel/plugin-transform-typescript': 7.16.8(@babel/core@7.18.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@babel/preset-typescript@7.17.12(@babel/core@7.18.0):
|
||||
resolution: {integrity: sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg==}
|
||||
|
@ -9050,15 +9049,6 @@ packages:
|
|||
lru-cache: 5.1.1
|
||||
dev: true
|
||||
|
||||
/@zeit/next-typescript@1.1.2-canary.0(@babel/core@7.18.0):
|
||||
resolution: {integrity: sha512-DxBzRYBFG7FvoU7nyf7nBP4gr0CdM/7noMCirVbFpfWVg7csOEBIVxWcAeUmlJRaxDBPplZ9W5BvtbxL3A8DRQ==}
|
||||
dependencies:
|
||||
'@babel/preset-typescript': 7.16.7(@babel/core@7.18.0)
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@zxing/text-encoding@0.9.0:
|
||||
resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==}
|
||||
requiresBuild: true
|
||||
|
|
Loading…
Reference in a new issue