Remove JS module import prefixes and use absolute paths to the frontend directory (#3924)

* Remove JS module import prefixes

* Fix code review mistakes
This commit is contained in:
Keavon Chambers
2026-03-21 00:08:32 -07:00
committed by GitHub
parent ed7987c881
commit 9bcac1af2d
80 changed files with 574 additions and 658 deletions
+2 -8
View File
@@ -1,7 +1,6 @@
import { execSync } from "child_process";
import { readFileSync } from "fs";
import path from "path";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { defineConfig } from "vite";
import type { PluginOption } from "vite";
@@ -14,12 +13,7 @@ export default defineConfig(({ mode }) => {
return {
plugins: plugins(mode),
resolve: {
alias: [
{ find: /@branding\/(.*\.svg)/, replacement: path.resolve(projectRootDir, "../branding", "$1?raw") },
{ find: "@graphite/../assets", replacement: path.resolve(projectRootDir, "assets") },
{ find: "@graphite/../public", replacement: path.resolve(projectRootDir, "public") },
{ find: "@graphite", replacement: path.resolve(projectRootDir, "src") },
],
alias: [{ find: /\/..\/branding\/(.*\.svg)/, replacement: path.resolve(projectRootDir, "../branding", "$1?raw") }],
},
server: {
port: 8080,
@@ -32,7 +26,7 @@ function plugins(mode: string): PluginOption[] {
const plugins = [
svelte(),
viteMultipleAssets(
// Additional static asset directories besides `public/`
// Additional static asset directories
[
{ input: "../demo-artwork/**", output: "demo-artwork" },
{ input: "../branding/favicons/**", output: "" },