From 4ed8530a406d6d3bc13bb09e73fcf903f5373fea Mon Sep 17 00:00:00 2001 From: mrmao Date: Fri, 9 Jun 2023 11:26:42 +0800 Subject: [PATCH] chore: update tsup config and fix import paths Updated tsup configuration to include all TypeScript files in the src directory as entry points, as well as specifying external dependencies to improve build output and bundle size. Fixed import paths in several components after reorganizing file structure. --- packages/vue3-pixi/src/components/application/index.ts | 4 ++-- packages/vue3-pixi/src/components/external/index.ts | 2 +- packages/vue3-pixi/src/global.ts | 1 + tsup.config.ts => packages/vue3-pixi/tsup.config.ts | 0 4 files changed, 4 insertions(+), 3 deletions(-) rename tsup.config.ts => packages/vue3-pixi/tsup.config.ts (100%) diff --git a/packages/vue3-pixi/src/components/application/index.ts b/packages/vue3-pixi/src/components/application/index.ts index 6c6799c..ea6adfd 100644 --- a/packages/vue3-pixi/src/components/application/index.ts +++ b/packages/vue3-pixi/src/components/application/index.ts @@ -4,8 +4,8 @@ import { throttle } from '@antfu/utils' import { Application as _Application } from 'pixi.js' import type { ColorSource, Container } from 'pixi.js' import type { App, PropType } from 'vue-demi' -import { createApp } from '@vue-pixi/renderer' -import { appInjectKey } from '@vue-pixi/composables' +import { createApp } from '../../renderer' +import { appInjectKey } from '../../composables' export interface ApplicationInst { canvas: HTMLCanvasElement diff --git a/packages/vue3-pixi/src/components/external/index.ts b/packages/vue3-pixi/src/components/external/index.ts index 0600887..72166c6 100644 --- a/packages/vue3-pixi/src/components/external/index.ts +++ b/packages/vue3-pixi/src/components/external/index.ts @@ -1,7 +1,7 @@ /* eslint-disable vue/one-component-per-file */ import type { App, PropType } from 'vue-demi' import { createApp, defineComponent, getCurrentInstance, h, inject, onMounted, onUnmounted, ref } from 'vue-demi' -import { appInjectKey } from '@vue-pixi/composables' +import { appInjectKey } from '../../composables' import { inheritParent } from './utils' export const External = defineComponent({ diff --git a/packages/vue3-pixi/src/global.ts b/packages/vue3-pixi/src/global.ts index 081a485..8a745b5 100644 --- a/packages/vue3-pixi/src/global.ts +++ b/packages/vue3-pixi/src/global.ts @@ -1,4 +1,5 @@ import '@vue/runtime-core' +import 'pixi.js' import type { SimpleRopeComponent } from './elements/simpleRope' import type { SimplePlaneComponent } from './elements/simplePlane' import type { NineSlicePlaneComponent } from './elements/nineSlicePlane' diff --git a/tsup.config.ts b/packages/vue3-pixi/tsup.config.ts similarity index 100% rename from tsup.config.ts rename to packages/vue3-pixi/tsup.config.ts