Closed JoshK2 closed 4 years ago
related to https://github.com/teambit/envs/issues/10 (full technical details are there)
@qballer If you want to see if bit's get the correct result props from the compiler, here is the exact point for this: https://github.com/teambit/bit/blob/master/src/consumer/component/consumer-component.ts#L679
The new typescript compiler and react typescript should support this partially now - jotils should work. I've hacked my way to cover most use cases. If I am to make this work for all I think I'm going to need the mapping from the source file in the workspace to the capsule. Otherwise I have no sure way to know which are dist test files. The reason is that when bit creates the vinyl files he does so relative to the workspace root directory as cwd. According to bit add structure they can change location in the capsule.
These are edge cases to say the least. But we will need to support that eventually.
@GiladShoham the problem is in getting the file paths. They are widely different.
fixed in 3.1.3
I test the TypeScript compiler on
jotils
, the build is working well, but when I test a component I get an error that tests files are not exist after building.STR:
jotils
project https://github.com/JoshK2/jotils.bit import
.bit import bit.envs/compilers/typescript@3.1.0 -c
.bit test letter-count
.This is the error I get:
Compiler:
bit.envs/compilers/typescript@3.1.0
Tester:bit.envs/testers/mocha@5.0.2