mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-23 05:33:08 +03:00
fix(plugin-cli): use relative path (#4698)
This commit is contained in:
parent
e75a0743f8
commit
493b815b7b
@ -15,8 +15,6 @@ import vue from '@vitejs/plugin-vue';
|
||||
import { build, type PluginOption } from 'vite';
|
||||
import type { z } from 'zod';
|
||||
|
||||
const projectRoot = fileURLToPath(new URL('../../..', import.meta.url));
|
||||
|
||||
const args = process.argv.splice(2);
|
||||
|
||||
const result = parseArgs({
|
||||
@ -66,10 +64,8 @@ const external = [
|
||||
/^@vanilla-extract/,
|
||||
];
|
||||
|
||||
const allPluginDir = path.resolve(projectRoot, 'packages/plugins');
|
||||
const pluginDir = process.cwd();
|
||||
|
||||
const getPluginDir = (plugin: string) => path.resolve(allPluginDir, plugin);
|
||||
const pluginDir = getPluginDir(plugin);
|
||||
const packageJsonFile = path.resolve(pluginDir, 'package.json');
|
||||
|
||||
const json: z.infer<typeof packageJsonInputSchema> = await readFile(
|
||||
@ -96,6 +92,7 @@ const metadata: Metadata = {
|
||||
assets: new Set(),
|
||||
};
|
||||
|
||||
const projectRoot = fileURLToPath(new URL('../../..', import.meta.url));
|
||||
const outDir = path.resolve(
|
||||
projectRoot,
|
||||
'packages/frontend/core/public/plugins'
|
||||
|
Loading…
Reference in New Issue
Block a user