feat(manifest): 删除无用文件
This commit is contained in:
parent
3443a50025
commit
0411816b2e
4
index.ts
4
index.ts
@ -1,4 +0,0 @@
|
|||||||
import { loadRemoteStyle } from "./utils/loadStyle";
|
|
||||||
|
|
||||||
// 动态注入 Tailwind CSS
|
|
||||||
loadRemoteStyle("/_remote-ui-kit/style.css"); // 部署后对应 CSS URL
|
|
@ -66,7 +66,7 @@ export default defineNuxtConfig({
|
|||||||
],
|
],
|
||||||
build: {
|
build: {
|
||||||
lib: {
|
lib: {
|
||||||
entry: "./index.ts",
|
entry: "",
|
||||||
name: "RemoteUI",
|
name: "RemoteUI",
|
||||||
fileName: "remote-ui-kit",
|
fileName: "remote-ui-kit",
|
||||||
formats: ["es"],
|
formats: ["es"],
|
||||||
|
@ -17,7 +17,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Nuxt buildDir 是 .nuxt
|
// Nuxt buildDir 是 .nuxt
|
||||||
const manifestPath = join(process.cwd(), ".nuxt/generated/manifest");
|
const manifestPath = join(process.cwd(), ".nuxt/generated/manifest.js");
|
||||||
|
|
||||||
// 检查文件是否存在
|
// 检查文件是否存在
|
||||||
await fs.access(manifestPath);
|
await fs.access(manifestPath);
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
export function loadRemoteStyle(url: string) {
|
|
||||||
if (!document.getElementById(url)) {
|
|
||||||
const link = document.createElement("link");
|
|
||||||
link.id = url;
|
|
||||||
link.rel = "stylesheet";
|
|
||||||
link.href = url;
|
|
||||||
document.head.appendChild(link);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user