Skip to content

Commit 91ecd4a

Browse files
committed
try fix
1 parent 2614fa8 commit 91ecd4a

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

src/components/view/viewport/Viewport.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1+
import { sortBy } from "@common/array.ts";
2+
import { vec2, Vec2, zero } from "@common/vec2.ts";
3+
import "@common/vector.ts";
4+
import { makeSection, makeSingle, Sections, useContextMenu } from "@components/contextmenu/ContextMenu.ts";
5+
import { useDispatchSelection } from "@components/editor/selection.ts";
16
import { Layout } from "@components/layout/layout.ts";
7+
import { toClassName } from "@components/utils.tsx";
28
import { Bounds } from "@editor/bounds.ts";
9+
import { MouseButtons, useDrag } from "@hooks/useDrag.ts";
310
import { useElementSize } from "@hooks/useElementSize.ts";
411
import React, { FC, useMemo, useRef, useState } from "react";
5-
import { vec2, Vec2, zero } from "@common/vec2.ts";
6-
import "@common/vector.ts";
712
import { SkapRoom, useSkapMap } from "../../../editor/map.ts";
8-
import { MouseButtons, useDrag } from "@hooks/useDrag.ts";
913
import { ViewToolbar } from "../../layout/LayoutViewToolbar.tsx";
14+
import { ActiveSelection } from "./ActiveSelection.tsx";
1015
import { Camera, useCamera } from "./camera.ts";
16+
import { viewportToMap } from "./mapping.ts";
17+
import { clickbox, zIndex } from "./objectProperties.ts";
1118
import { BackgroundObstacleWebGLRenderer, BackgroundWebGLRenderer } from "./renderer/background.ts";
1219
import { LavaWebGLRenderer } from "./renderer/lava.ts";
1320
import { ObstacleWebGLRenderer } from "./renderer/obstacle.ts";
1421
import { TextLayer } from "./renderer/text.tsx";
1522
import css from "./Viewport.module.css";
1623
import { WebGLLayer } from "./webgl/WebGLLayer.tsx";
17-
import { useContextMenu } from "@components/contextmenu/ContextMenu.ts";
18-
import { makeSection, Sections, makeSingle } from "@components/contextmenu/ContextMenu.ts";
19-
import { viewportToMap } from "./mapping.ts";
20-
import { useDispatchSelection } from "@components/editor/selection.ts";
21-
import { clickbox, zIndex } from "./objectProperties.ts";
22-
import { sortBy } from "@common/array.ts";
23-
import { ActiveSelection } from "./ActiveSelection.tsx";
24-
import { toClassName } from "@components/utils.tsx";
2524

2625
export type ViewportInfo = {
2726
camera: Camera;

vite.config.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@ import react from "@vitejs/plugin-react-swc";
33
import path from "node:path";
44

55
// https://vitejs.dev/config/
6-
export default defineConfig(env => ({
7-
plugins: [react()],
8-
base: env.mode === "PRODUCTION" ? "/SkapEdit/" : "/",
9-
resolve: {
10-
alias: {
11-
"@common": path.join(__dirname, "./src/common"),
12-
"@components": path.join(__dirname, "./src/components"),
13-
"@hooks": path.join(__dirname, "./src/hooks"),
14-
"@icon": path.join(__dirname, "./src/components/icon/icon"),
15-
"@editor": path.join(__dirname, "./src/editor"),
6+
export default defineConfig(env => {
7+
const base = env.mode === "PRODUCTION" ? "/SkapEdit/" : "/";
8+
console.log("Base:", base);
9+
return {
10+
plugins: [react()],
11+
base,
12+
resolve: {
13+
alias: {
14+
"@common": path.join(__dirname, "./src/common"),
15+
"@components": path.join(__dirname, "./src/components"),
16+
"@hooks": path.join(__dirname, "./src/hooks"),
17+
"@icon": path.join(__dirname, "./src/components/icon/icon"),
18+
"@editor": path.join(__dirname, "./src/editor"),
19+
}
1620
}
17-
}
18-
}));
21+
};
22+
});

0 commit comments

Comments
 (0)