fix: resolve module import issues for Next.js/Turbopack compatibility

- Remove .js extensions from all TypeScript imports throughout codebase
- Update dev config to use testProvider instead of mollieProvider for testing
- Fix module resolution issues preventing development server startup
- Enable proper testing of billing plugin functionality with test provider

This resolves the "Module not found: Can't resolve" errors that were
preventing the development server from starting with Next.js/Turbopack.
All TypeScript imports now use extension-less imports as required.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-19 12:12:39 +02:00
parent 64c58552cb
commit d5a47a05b1
19 changed files with 145 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
import type { Payment } from '../plugin/types/payments.js'
import type { PaymentProvider } from '../plugin/types/index.js'
import type { Payment } from '../plugin/types/payments'
import type { PaymentProvider } from '../plugin/types/index'
import type { Payload } from 'payload'
import { createSingleton } from '../plugin/singleton.js'
import { createSingleton } from '../plugin/singleton'
import type { createMollieClient, MollieClient } from '@mollie/api-client'
import {
webhookResponses,
@@ -10,8 +10,8 @@ import {
updateInvoiceOnPaymentSuccess,
handleWebhookError,
validateProductionUrl
} from './utils.js'
import { formatAmountForProvider, isValidAmount, isValidCurrencyCode } from './currency.js'
} from './utils'
import { formatAmountForProvider, isValidAmount, isValidCurrencyCode } from './currency'
const symbol = Symbol('mollie')
export type MollieProviderConfig = Parameters<typeof createMollieClient>[0]