feat: Add @
alias to ./src
This commit is contained in:
parent
14479d3d14
commit
6b903d5a14
4 changed files with 17 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
import { onDestroy, onMount } from "svelte";
|
||||
import { version } from "./api";
|
||||
import { version } from "@/api";
|
||||
import { showMessage } from "siyuan";
|
||||
import Typo from "./libs/b3-typography.svelte";
|
||||
import Typo from "@/libs/b3-typography.svelte";
|
||||
|
||||
export let name: string;
|
||||
export let i18n: any;
|
||||
|
|
|
@ -10,10 +10,10 @@ import {
|
|||
getBackend,
|
||||
IModel
|
||||
} from "siyuan";
|
||||
import "./index.scss";
|
||||
import "@/index.scss";
|
||||
|
||||
import HelloExample from "./hello.svelte";
|
||||
import SettingPannel from "./libs/setting-panel.svelte";
|
||||
import HelloExample from "@/hello.svelte";
|
||||
import SettingPannel from "@/libs/setting-panel.svelte";
|
||||
|
||||
const STORAGE_NAME = "menu-config";
|
||||
const TAB_TYPE = "custom_tab";
|
||||
|
|
|
@ -35,7 +35,12 @@
|
|||
"node",
|
||||
"vite/client",
|
||||
"svelte"
|
||||
]
|
||||
],
|
||||
"baseUrl": "./src",
|
||||
"paths": {
|
||||
"@/*": ["*"],
|
||||
"@/libs/*": ["libs/*"],
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"tools/**/*.ts",
|
||||
|
|
|
@ -16,6 +16,12 @@ console.log("isWatch=>", isWatch)
|
|||
console.log("distDir=>", distDir)
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": resolve(__dirname, "src"),
|
||||
}
|
||||
},
|
||||
|
||||
plugins: [
|
||||
svelte(),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue