Bundle all core extensions (#27)

This commit is contained in:
Chenlei Hu
2024-06-18 12:48:52 -04:00
committed by GitHub
parent e4b9cbbe17
commit eadcc5e72e
26 changed files with 79 additions and 51 deletions

View File

@@ -12,7 +12,8 @@ function comfyAPIPlugin(): Plugin {
return {
name: 'comfy-api-plugin',
transform(code: string, id: string) {
if (id.endsWith('.ts')) {
// TODO: Remove second condition after all js files are converted to ts
if (id.endsWith('.ts') || (id.endsWith('.js') && id.includes("extensions/core"))) {
const result = transformExports(code, id);
if (result.exports.length > 0) {
@@ -87,7 +88,6 @@ export default defineConfig({
viteStaticCopy({
targets: [
{src: "src/lib/*", dest: "lib/"},
{src: "src/extensions/*", dest: "extensions/"},
],
}),
],