diff --git a/src/popup/Popup.tsx b/src/popup/Popup.tsx index af343cb..223a67b 100644 --- a/src/popup/Popup.tsx +++ b/src/popup/Popup.tsx @@ -1,6 +1,6 @@ import { useState } from 'react' import { ThemeProvider, Flex, Box } from 'theme-ui' -import { theme } from '../theme' +import { theme } from 'theme' import { Wifi, MessageSquare, diff --git a/src/popup/components/DebouncedInput.tsx b/src/popup/components/DebouncedInput.tsx index 508120b..7563ec5 100644 --- a/src/popup/components/DebouncedInput.tsx +++ b/src/popup/components/DebouncedInput.tsx @@ -1,6 +1,6 @@ import { Dispatch, SetStateAction, ChangeEvent, useMemo } from 'react' import { Label, Input, Box } from 'theme-ui' -import detachDebugger from '../../utils/detachDebugger' +import detachDebugger from 'utils/detachDebugger' import debounce from 'lodash.debounce' interface DebouncedInputProps { diff --git a/src/popup/pages/locationPage/index.tsx b/src/popup/pages/locationPage/index.tsx index 2edc0da..904bd5f 100644 --- a/src/popup/pages/locationPage/index.tsx +++ b/src/popup/pages/locationPage/index.tsx @@ -1,13 +1,13 @@ import { useState, useEffect, ChangeEvent, useCallback } from 'react' import { Box, Flex, Label, Select } from 'theme-ui' -import Page from '../../components/Page' -import Checkbox from '../../components/CheckBox' -import DebouncedInput from '../../components/DebouncedInput' -import detachDebugger from '../../../utils/detachDebugger' -import countryLocales from '../../../utils/countryLocales' -import configurations from '../../../utils/configurations' -import { ipData } from '../../../types' -import getIp from '../../../utils/getIp' +import Page from 'popup/components/Page' +import Checkbox from 'popup/components/CheckBox' +import DebouncedInput from 'popup/components/DebouncedInput' +import detachDebugger from 'utils/detachDebugger' +import countryLocales from 'utils/countryLocales' +import configurations from 'utils/configurations' +import getIp from 'utils/getIp' +import { ipData } from 'types' import { RotateCw } from 'react-feather' interface LocationPageProps { diff --git a/src/popup/pages/settingsPage/index.tsx b/src/popup/pages/settingsPage/index.tsx index c4b2988..3ee9e86 100644 --- a/src/popup/pages/settingsPage/index.tsx +++ b/src/popup/pages/settingsPage/index.tsx @@ -1,5 +1,5 @@ import { Link, Text } from 'theme-ui' -import Page from '../../components/Page' +import Page from 'popup/components/Page' import InfoItem from './InfoItem' interface SettingsPageProps { diff --git a/src/popup/pages/userAgentPage/index.tsx b/src/popup/pages/userAgentPage/index.tsx index 579e01a..309046e 100644 --- a/src/popup/pages/userAgentPage/index.tsx +++ b/src/popup/pages/userAgentPage/index.tsx @@ -1,10 +1,10 @@ import { useState, useEffect, ChangeEvent } from 'react' import { Box, Label, Select } from 'theme-ui' -import Checkbox from '../../components/CheckBox' -import DebouncedInput from '../../components/DebouncedInput' -import userAgents from '../../../utils/userAgents' -import detachDebugger from '../../../utils/detachDebugger' -import Page from '../../components/Page' +import Checkbox from 'popup/components/CheckBox' +import DebouncedInput from 'popup/components/DebouncedInput' +import userAgents from 'utils/userAgents' +import detachDebugger from 'utils/detachDebugger' +import Page from 'popup/components/Page' interface UserAgentPageProps { tab: string diff --git a/src/popup/pages/vpnPage/index.tsx b/src/popup/pages/vpnPage/index.tsx index e7b251c..b24e868 100644 --- a/src/popup/pages/vpnPage/index.tsx +++ b/src/popup/pages/vpnPage/index.tsx @@ -1,8 +1,8 @@ import { Box, Image } from 'theme-ui' -import Page from '../../components/Page' +import Page from 'popup/components/Page' import VpnItem from './VpnItem' -import nordLogo from '../../../assets/nord.svg' -import protonLogo from '../../../assets/proton.svg' +import nordLogo from 'assets/nord.svg' +import protonLogo from 'assets/proton.svg' interface VpnPageProps { tab: string diff --git a/tsconfig.json b/tsconfig.json index f709e41..9671e70 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "baseUrl": "./src", "target": "es6", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": false, diff --git a/webpack.config.js b/webpack.config.js index ccc9b1c..410788e 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -99,6 +99,7 @@ var options = { ], }, resolve: { + modules: [path.resolve(__dirname, 'src'), 'node_modules'], alias: alias, extensions: fileExtensions .map((extension) => '.' + extension)