diff --git a/src/data/internship.ts b/src/data/internship.ts index 96dd1b6..1808e03 100644 --- a/src/data/internship.ts +++ b/src/data/internship.ts @@ -1,5 +1,5 @@ import { Moment } from "moment"; -import { Nullable } from "../helpers"; +import { Nullable } from "@/helpers"; import { Identifiable } from "./common"; export enum InternshipType { diff --git a/src/forms/company.tsx b/src/forms/company.tsx index c8f4826..1da1eeb 100644 --- a/src/forms/company.tsx +++ b/src/forms/company.tsx @@ -1,6 +1,6 @@ import React, { HTMLProps, useEffect, useMemo, useState } from "react"; -import { BranchOffice, Company, emptyAddress, emptyBranchOffice, emptyCompany, formatAddress } from "../data/company"; -import { sampleCompanies } from "../provider/dummy"; +import { BranchOffice, Company, emptyAddress, emptyBranchOffice, emptyCompany, formatAddress } from "@/data"; +import { sampleCompanies } from "@/provider/dummy"; import { Autocomplete } from "@material-ui/lab"; import { Grid, TextField, Typography } from "@material-ui/core"; import { formFieldProps } from "./helpers"; diff --git a/src/forms/helpers.ts b/src/forms/helpers.ts index 4fafb88..13ea3f9 100644 --- a/src/forms/helpers.ts +++ b/src/forms/helpers.ts @@ -1,4 +1,4 @@ -import { DOMEvent } from "../helpers"; +import { DOMEvent } from "@/helpers"; type UpdatingEvent = "onBlur" | "onChange" | "onInput"; type FormFieldHelperOptions = { diff --git a/src/provider/dummy/company.ts b/src/provider/dummy/company.ts index 3d13aba..df684dd 100644 --- a/src/provider/dummy/company.ts +++ b/src/provider/dummy/company.ts @@ -1,4 +1,4 @@ -import { Company } from "../../data/company"; +import { Company } from "@/data"; import { makeIdSequence } from "./helpers"; const companySequence = makeIdSequence(); diff --git a/src/provider/dummy/helpers.ts b/src/provider/dummy/helpers.ts index d65ea2b..cf88fab 100644 --- a/src/provider/dummy/helpers.ts +++ b/src/provider/dummy/helpers.ts @@ -1,4 +1,4 @@ -import { Identifiable } from "../../data"; +import { Identifiable } from "@/data"; type SequenceGenerator = { (): string; diff --git a/src/provider/dummy/student.ts b/src/provider/dummy/student.ts index 3036342..0dd5dd4 100644 --- a/src/provider/dummy/student.ts +++ b/src/provider/dummy/student.ts @@ -1,4 +1,4 @@ -import { Course, InternshipProgramEntry, Student } from "../../data" +import { Course, InternshipProgramEntry, Student } from "@/data" import { makeIdSequence } from "./helpers"; const programEntryIdSequence = makeIdSequence(); diff --git a/tsconfig.json b/tsconfig.json index 4e18df8..a94667f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,11 @@ "isolatedModules": true, "noEmit": true, "jsx": "react", - "sourceMap": true + "sourceMap": true, + "baseUrl": "./", + "paths": { + "@/*": ["./src/*"] + } }, "include": [ "src" diff --git a/webpack.config.js b/webpack.config.js index 86c05f3..9e42911 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,6 +13,9 @@ const config = { }, resolve: { extensions: ['.tsx', '.ts', '.js'], + alias: { + '@': path.resolve(__dirname, './src'), + } }, module: { rules: [{