Skip to content

Conversation

fayazara
Copy link
Contributor

No description provided.

Copy link
Contributor

@johannschopplich johannschopplich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be simpler. Untested, however. 🙂


export default defineBuildConfig({
entries: [
"src/index.ts",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need the extension:

Suggested change
"src/index.ts",
"src/index",

export default defineBuildConfig({
entries: [
"src/index.ts",
{
Copy link
Contributor

@johannschopplich johannschopplich Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, using mkdist might be overcomplicating things. Could you please try just referencing all source files like services/resend in the entries option?

Like this:

export default defineBuildConfig({
  entries: [
    "src/index",
    "src/services/resend",
    "src/services/plunk"
    // etc.
  ],
  // You should now be able to omit the `externals`!
}

Rollup should automatically resolve these as separate chunks.

@productdevbook
Copy link

To achieve this you have to build a plugin system

@fayazara
Copy link
Contributor Author

Yes, I thought of making an adapter system but I dont have the bandwidth to pick this up.

Here are a few things I have planned

  1. Improve the performance - remove ofetch dependency so package becomes smaller
  2. Make a plug and play adapter system so you dont need all the unnecessary packages

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

Successfully merging this pull request may close these issues.

3 participants