Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow build from 'fastify-cli/helper.js' to accept an existing module object #660

Open
2 tasks done
segevfiner opened this issue Sep 10, 2023 · 0 comments
Open
2 tasks done

Comments

@segevfiner
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Allow build from 'fastify-cli/helper.js' to accept an existing module object instead of importing/requiring by itself.

Motivation

vitest doesn't support fully dynamic imports that well, especially inside imported modules which default to be externalized, which means the import will happen using Node's standard require/import which can't import TypeScript and has other limitations

Example

import appPlugin from '../src/app';

const app = await helper.buildApp(appPlugin, ['--other-arg'], await config());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant