Files
mattermost/webapp/channels/tsconfig.json
T
Harrison Healey 4049300129 Change moduleResolution to bundler for web app (#35081)
This tells the TypeScript compiler (only used for type checking in the web app)
to use the `imports` and `exports` field of a package's `package.json` to find
modules. Those fields are standard in newer versions of Node.js, and hopefully
supporting them means that we'll have to do less work to configure tooling in
the future.

We could also get similar behaviour by using the `nodenext` option, but that
adds some additional requirements to include file extensions which ES Modules
technically require, but I don't think we need to enforce because other tooling
doesn't require them.

I wanted to make that change in all of the subpackages as well, but we can't do
that without having TypeScript output ES Modules which, unless we change their
build processes to generate multiple formats (like the shared package in
client package, or the types package which is more than I want to do at the
moment.

The changes to other files are either because they incorrectly imported types
from a file that isn't intentionally exposed by the plugin or it's because we
had a typo in a file path.
2026-02-02 12:08:04 -05:00

45 lines
1.1 KiB
JSON

{
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"isolatedModules": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"strictNullChecks": true,
"forceConsistentCasingInFileNames": true,
"module": "es2020",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"noEmit": true,
"experimentalDecorators": true,
"jsx": "react",
"baseUrl": "./src",
"useUnknownInCatchVariables": false,
"composite": true,
"types": ["@testing-library/jest-dom"],
"paths": {
"mattermost-redux/*": ["packages/mattermost-redux/src/*"],
"@mui/styled-engine": ["./node_modules/@mui/styled-engine-sc"],
},
"plugins": [{
"name": "typescript-eslint-language-service"
}]
},
"include": [
"./src/**/*",
"./src/**/*.json"
],
"references": [
{"path": "../platform/client"},
{"path": "../platform/components"},
{"path": "../platform/types"}
]
}