【发布时间】:2020-09-09 22:54:59
【问题描述】:
在我们的项目中,我们有一些缩小的库,它们有点像黑盒子。它们真的很老,而且是专有软件(所以没有打字或 GitHub 存储库或任何东西)。
我们正在探索使用 Typescript 迁移到 create-react-app,但我们还没有找到一种方法让它在启动/编译项目时忽略这些文件。
我们得到的错误是:
Failed to compile.
./src/minified-files/some-lib.min.js
Line 11:57: 'define' is not defined no-undef
Line 11:69: 'define' is not defined no-undef
Line 11:7435: Expected an assignment or function call and instead saw an expression no-unused-expressions
这是我们尝试过的:
- 将
"exclude": [ "./src/minified-files/*" ]添加到tsconfig.json - 将
src/minified-files/*添加到.eslintignore
到目前为止没有任何效果,有什么想法吗?
【问题讨论】:
标签: typescript create-react-app eslint