瀏覽代碼

Next.js does not use Babel (at least for single file) anymore

> Compiling using Next.js compiler instead of Babel is enabled by default since v12

https://nextjs.org/docs/architecture/nextjs-compiler
Manav Rathi 1 年之前
父節點
當前提交
3fad0427a7
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      packages/utils/tsconfig.json

+ 4 - 4
packages/utils/tsconfig.json

@@ -10,15 +10,15 @@
          *
          *
          * In our case, we tell it that the code will run in a modern browser,
          * In our case, we tell it that the code will run in a modern browser,
          * and will have access to a latest JS (esnext) and the DOM (dom). Our
          * and will have access to a latest JS (esnext) and the DOM (dom). Our
-         * transpiler (Babel via Next.js) will take care that these things hold.
+         * transpiler (Next.js) will ensure that these things hold.
          *
          *
          * Unlike the other individual library components (say how "esnext"
          * Unlike the other individual library components (say how "esnext"
          * implies "esnext.*"), "dom.iterable" (the ability to iterate over DOM
          * implies "esnext.*"), "dom.iterable" (the ability to iterate over DOM
          * elements) is not a subset of "dom" and needs to be listed out
          * elements) is not a subset of "dom" and needs to be listed out
          * explicitly.
          * explicitly.
          *
          *
-         * Note that we don't need to specify target, since TypeScript isn't
-         * actually generating (emitting) the JavaScript.
+         * Note that we don't need to specify the `target` compilerOption, since
+         * TypeScript isn't actually generating (emitting) the JavaScript.
          */
          */
         "lib": ["esnext", "dom", "dom.iterable"],
         "lib": ["esnext", "dom", "dom.iterable"],
 
 
@@ -47,7 +47,7 @@
         "jsx": "preserve",
         "jsx": "preserve",
 
 
         /* Ask TypeScript to warn us if we use TypeScript features that cannot
         /* Ask TypeScript to warn us if we use TypeScript features that cannot
-           be used by single-file transpilers (Babel in our case) */
+           be used by single-file transpilers */
         "isolatedModules": true,
         "isolatedModules": true,
         /* Enable various workarounds to play better with CJS libraries */
         /* Enable various workarounds to play better with CJS libraries */
         "esModuleInterop": true,
         "esModuleInterop": true,