refactor: use absolute module paths

This commit is contained in:
Jeremy Kahn 2022-08-16 09:21:33 -05:00
parent a4472d6982
commit 40b0b7047e
6 changed files with 11 additions and 10 deletions

View File

@ -3,8 +3,8 @@ import { useParams } from 'react-router-dom'
import Button from '@mui/material/Button' import Button from '@mui/material/Button'
import Typography from '@mui/material/Typography' import Typography from '@mui/material/Typography'
import { usePeerRoom } from '../../hooks/usePeerRoom' import { usePeerRoom } from 'hooks/usePeerRoom'
import { PeerRoom } from '../../services/PeerRoom' import { PeerRoom } from 'services/PeerRoom'
enum PeerActions { enum PeerActions {
MESSAGE = 'MESSAGE', MESSAGE = 'MESSAGE',

View File

@ -1,6 +1,6 @@
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { PeerRoom, getPeerRoom } from '../../services/PeerRoom' import { PeerRoom, getPeerRoom } from 'services/PeerRoom'
interface PeerRoomProps { interface PeerRoomProps {
appId: string appId: string

View File

@ -4,10 +4,10 @@ import { BrowserRouter as Router } from 'react-router-dom'
import { ThemeProvider, createTheme } from '@mui/material/styles' import { ThemeProvider, createTheme } from '@mui/material/styles'
import CssBaseline from '@mui/material/CssBaseline' import CssBaseline from '@mui/material/CssBaseline'
import * as serviceWorkerRegistration from './serviceWorkerRegistration' import * as serviceWorkerRegistration from 'serviceWorkerRegistration'
import './index.sass' import 'index.sass'
import Bootstrap from './Bootstrap' import Bootstrap from 'Bootstrap'
import reportWebVitals from './reportWebVitals' import reportWebVitals from 'reportWebVitals'
const darkTheme = createTheme({ const darkTheme = createTheme({
palette: { palette: {

View File

@ -1,4 +1,4 @@
import { Room } from '../../components/Room' import { Room } from 'components/Room'
export function PublicRoom() { export function PublicRoom() {
return <Room /> return <Room />

View File

@ -1,6 +1,6 @@
import { joinRoom, Room, RoomConfig } from 'trystero' import { joinRoom, Room, RoomConfig } from 'trystero'
import { sleep } from '../../utils' import { sleep } from 'utils'
export class PeerRoom { export class PeerRoom {
private room: Room private room: Room

View File

@ -14,7 +14,8 @@
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"noEmit": true, "noEmit": true,
"jsx": "react-jsx" "jsx": "react-jsx",
"baseUrl": "src"
}, },
"include": ["src"] "include": ["src"]
} }