小编Din*_*til的帖子

出现错误 TS17004:除非提供“--jsx”标志,否则无法使用 JSX

嘿伙计们,这个问题还没有通过类似的解决,

\n
    \n
  1. 构建:除非提供“--jsx”标志,否则无法使用 JSX
  2. \n
  3. 除非提供“--jsx”标志,否则无法使用 JSX
  4. \n
\n

尝试了他们的解决方案,但对我不起作用。

\n

现在我的情况\n tsconfig.js

\n
{\n    "compilerOptions": {\n        "noUnusedLocals": false,\n        "noUnusedParameters": false,\n        "noImplicitReturns": false,\n        "noImplicitAny": false,\n        "skipLibCheck": false,\n        "strict": false,\n        "strictNullChecks": false,\n        "allowSyntheticDefaultImports": true,\n        "esModuleInterop": true,\n        "resolveJsonModule": true,\n        "experimentalDecorators": true,\n        "emitDecoratorMetadata": true,\n        "declaration": true,\n        "jsx": "react",\n        "module": "commonjs",\n        "moduleResolution": "node",\n        "target": "es6",\n        "outDir": "./dist",\n        "lib": [\n            "dom",\n            "esnext"\n        ]\n    },\n    "esModuleInterop": true,\n    "include": [\n        "src/components/canvas/index.tsx",\n        "src/components/canvas/Canvas.tsx",\n        "src/components/canvas/global.d.ts"\n    ],\n    "exclude": [\n        "node_modules",\n        "dist",\n        "lib"\n    ]\n}\n\n
Run Code Online (Sandbox Code Playgroud)\n

gulpfile.js

\n
\nconst gulp …
Run Code Online (Sandbox Code Playgroud)

typescript reactjs gulp tsconfig babeljs

9
推荐指数
1
解决办法
2万
查看次数

标签 统计

babeljs ×1

gulp ×1

reactjs ×1

tsconfig ×1

typescript ×1