feat: 设置本地别名

This commit is contained in:
ningmengchongshui 2024-06-10 19:35:37 +08:00
parent baaf8a1cb7
commit 1df4142828
6 changed files with 13 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import Koa from 'koa'
import KoaStatic from 'koa-static'
import Router from 'koa-router'
import { Component } from '../src/utils/index.js'
import { Component } from '#miao/utils'
import { readdirSync } from 'fs'
import { join } from 'path'
import './tailwindcss.js'

View File

@ -1,4 +1,4 @@
import { type ComponentCreateOpsionType } from '../src/utils/component.js'
import { type ComponentCreateOpsionType } from '#miao/utils'
export type RouterType = {
url: string
element: React.ReactNode

View File

@ -1,6 +1,6 @@
{
"name": "miao-yunzai",
"version": "4.0.0",
"version": "4.0.0-rc.0",
"author": "Yoimiya-Kokomi, Le-niao",
"description": "QQ Group Bot",
"main": "./index.js",
@ -79,6 +79,7 @@
"typescript": "^5.0.4"
},
"imports": {
"#miao/*": "./src/*",
"#miao": "./plugins/miao-plugin/components/index.js",
"#miao.models": "./plugins/miao-plugin/models/index.js"
}

1
src/config/index.ts Normal file
View File

@ -0,0 +1 @@
export {}

View File

@ -1,3 +1,5 @@
export * from './config/index.js'
export * from './core/index.js'
export * from './db/index.js'
export * from './mys/index.js'
export * from './utils/index.js'

View File

@ -29,7 +29,13 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
//
"paths": {
//
"#miao/*": ["./src/*"],
//
"#miao": ["./plugins/miao-plugin/components/index.js"],
"#miao.models": ["./plugins/miao-plugin/models/index.js"]
}