Typescript configuration: is module setting case sensitive?

落花浮王杯 提交于 2021-01-29 14:27:55

问题


I've got a question coming from the following two tsconfig.json files, they're in the same project, one extends the other:

Parent

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "module": "ESNext"
    }
    // ...

Child

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/app",
    "module": "esNext",
   },
   
   // ...

}

It's unclear:

  1. is the module param case sensitive?
  2. a setup like this, with a child config extending the parent, same module type, but with different case. Would that affect the ouput somehow, giving different results? (I'd say that if the module is equal, it should be defined only in the parent).

Info available

From another answer:

In order to make code portable, it's important to make sure the casing in a module specifier matches the referenced file name exactly.

I'm not sure what does the OP refers to, when saying "to make code portable", any clarification about it?

Thanks

来源:https://stackoverflow.com/questions/62943333/typescript-configuration-is-module-setting-case-sensitive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!