You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	Convert a bunch more js-sdk imports to absolute paths
Turns out a lot of the typescript warnings about improper warnings were correct. TypeScript appears to be pulling in two copies of the js-sdk when we do this, which can lead to type conflicts (or worse: the wrong code entirely). We fix this at the webpack level by explicitly importing from `src`, but some alternative build structures have broken tests because of this - jest ends up pulling in the "wrong" js-sdk, breaking things.
This commit is contained in:
		@@ -18,7 +18,7 @@ limitations under the License.
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import PropTypes from 'prop-types';
 | 
			
		||||
 | 
			
		||||
import {Filter} from 'matrix-js-sdk';
 | 
			
		||||
import {Filter} from 'matrix-js-sdk/src/filter';
 | 
			
		||||
import * as sdk from '../../index';
 | 
			
		||||
import {MatrixClientPeg} from '../../MatrixClientPeg';
 | 
			
		||||
import EventIndexPeg from "../../indexing/EventIndexPeg";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user