mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-13 04:13:24 +00:00
fix: resolve module resolution errors by replacing path aliases with relative imports
- Replace all @/ path aliases with proper relative imports and .js extensions - Update @mollie/api-client peer dependency to support v4.x (^3.7.0 || ^4.0.0) - Bump version to 0.1.5 - Ensure ESM compatibility for plugin distribution Fixes module resolution error: "Cannot find package '@/collections'" when using the plugin in external PayloadCMS projects. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { CollectionConfig } from 'payload'
|
||||
import { FieldsOverride } from '@/plugin/utils'
|
||||
import { PaymentProvider } from '@/plugin/types'
|
||||
import { FieldsOverride } from './utils.js'
|
||||
import { PaymentProvider } from './types/index.js'
|
||||
|
||||
export const defaults = {
|
||||
paymentsCollection: 'payments',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { createInvoicesCollection, createPaymentsCollection, createRefundsCollection } from '@/collections'
|
||||
import type { BillingPluginConfig } from '@/plugin/config'
|
||||
import { createInvoicesCollection, createPaymentsCollection, createRefundsCollection } from '../collections/index.js'
|
||||
import type { BillingPluginConfig } from './config.js'
|
||||
import type { Config, Payload } from 'payload'
|
||||
import { createSingleton } from '@/plugin/singleton'
|
||||
import type { PaymentProvider } from '@/providers'
|
||||
import { createSingleton } from './singleton.js'
|
||||
import type { PaymentProvider } from '../providers/index.js'
|
||||
|
||||
const singleton = createSingleton(Symbol('billingPlugin'))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export * from './id'
|
||||
export * from './invoices'
|
||||
export * from './payments'
|
||||
export * from './refunds'
|
||||
export * from '../../providers/types'
|
||||
export * from './id.js'
|
||||
export * from './invoices.js'
|
||||
export * from './payments.js'
|
||||
export * from './refunds.js'
|
||||
export * from '../../providers/types.js'
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Payment } from '@/plugin/types/payments'
|
||||
|
||||
import { Id } from '@/plugin/types/id'
|
||||
import { Payment } from './payments.js'
|
||||
import { Id } from './id.js'
|
||||
|
||||
export interface Invoice<TCustomer = unknown> {
|
||||
id: Id;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Refund } from '@/plugin/types/refunds'
|
||||
import { Invoice } from '@/plugin/types/invoices'
|
||||
import { Id } from '@/plugin/types/id'
|
||||
import { Refund } from './refunds.js'
|
||||
import { Invoice } from './invoices.js'
|
||||
import { Id } from './id.js'
|
||||
|
||||
export interface Payment {
|
||||
id: Id;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Payment } from '@/plugin/types/payments'
|
||||
import { Payment } from './payments.js'
|
||||
|
||||
export interface Refund {
|
||||
id: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { CollectionConfig, CollectionSlug, Field } from 'payload'
|
||||
import type { Id } from '@/plugin/types'
|
||||
import type { Id } from './types/index.js'
|
||||
|
||||
export type FieldsOverride = (args: { defaultFields: Field[] }) => Field[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user