mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor(es modules): set up alias
This commit is contained in:
parent
f9aeaddf52
commit
11df349394
4 changed files with 15 additions and 4 deletions
|
|
@ -13,7 +13,6 @@ import {restoreDefaultEvents} from "./scripts/events";
|
|||
import {addGlobalListeners} from "./scripts/listeners";
|
||||
import {locked} from "./scripts/options/lock";
|
||||
import {clearMainTip, tip} from "./scripts/tooltips";
|
||||
import {createTypedArray} from "./utils/arrayUtils";
|
||||
import {
|
||||
calculateVoronoi,
|
||||
findCell,
|
||||
|
|
@ -23,6 +22,7 @@ import {
|
|||
shouldRegenerateGrid
|
||||
} from "./utils/graphUtils";
|
||||
import {rn, minmax, normalize} from "./utils/numberUtils";
|
||||
import {createTypedArray} from "./utils/arrayUtils";
|
||||
import {byId} from "./utils/shorthands";
|
||||
import "./components";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {UINT16_MAX, UINT32_MAX, UINT8_MAX} from "../constants";
|
||||
import {UINT8_MAX, UINT16_MAX, UINT32_MAX} from "@/constants";
|
||||
|
||||
export function last<T>(array: T[]) {
|
||||
return array[array.length - 1];
|
||||
|
|
|
|||
|
|
@ -14,7 +14,11 @@
|
|||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"skipLibCheck": true
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src", "utils", "modules"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
import {defineConfig} from "vite";
|
||||
import {fileURLToPath} from "url";
|
||||
import path from "path";
|
||||
|
||||
export default defineConfig({
|
||||
base: "/Fantasy-Map-Generator/"
|
||||
base: "/Fantasy-Map-Generator/",
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "/src")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue