envs
envs copied to clipboard
React typescript - does not merge compiler options from overrides on workspace configuration
Assuming you imported a component that has a configuration in its pacakge.json similar to this:
"bit": {
"env": {
"compiler": {
"bit.envs/compilers/[email protected]": {
"rawConfig": {
"tsconfig": {
"compilerOptions": {
"lib": [
"dom",
"es2015"
],
"jsx": "react"
},
"include": [
"./**/*"
]
}
}
},
If you are modifying the compiler configuration on the workspace package.json to include:
"bit": {
"env": {
"compiler": {
"bit.envs/compilers/react-typescript": {
"rawConfig": {
"tsconfig": {
"compilerOptions": {
"target": "ES5",
"module": "CommonJS"
}
}
}
}
},
or even if doing it in the overrides section for all components. The compilerOptions for target and module are being ignored when building the component.
It is not clear if this is a compiler bug or a bit bug that does not send the additional properties.