Skip to content

Commit

Permalink
Merge branch 'canary' into wbinnssmith/correct-turbo-session
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Sep 22, 2023
2 parents f19ff31 + b5c3996 commit 778c2de
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 41 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
28 changes: 0 additions & 28 deletions packages/next/src/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 2 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 778c2de

Please sign in to comment.