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

fix(plugin/optimizer): 🐛 Enhance support for custom entry points in Vite config #6178

Merged
merged 3 commits into from
May 1, 2024

Conversation

diecodev
Copy link
Contributor

@diecodev diecodev commented Apr 29, 2024

Overview

This PR aims to enhance the support for custom entry points in the Vite configuration in library mode, enabling developers to specify custom entry points and facilitating the creation of libraries with custom submodules. By extending the capability of Vite configuration, this enhancement provides flexibility and empowers developers to tailor their projects more effectively.

What is it?

  • Feature / enhancement
  • Bug Fix
  • Docs / tests / types / typos

Description

This PR modifies the code to allow for custom entry points in the Vite configuration (library mode). It includes updates to handle custom entry points provided in the Vite config file. This enhancement aims to address the need for developers to create libraries with custom submodules by providing a more flexible configuration option.

Use cases and why

The primary use cases for this enhancement include:

  1. Custom Entry Points: Developers can now specify custom entry points in the Vite config file, allowing for more granular control over project structure and module loading.
  2. Library Creation: This enhancement facilitates the creation of libraries with custom submodules, enabling developers to structure their libraries in a way that best suits their needs.

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

Issues Related:

This PR solve my own issue: #6177

…ite config

This commit extends the capability of Vite configuration by allowing developers to specify custom entry points. This enhancement enables the creation of libraries with custom submodules. Now, the library mode handles all possible cases for the Vite `lib.entry` field.
@thejackshelton
Copy link
Member

On first glance everything looks good. It takes a custom path which is resolved, and allows for object inputs. If anyone else could review before merging.

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

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

Tiny nitpick, other than that it looks great!

@PatrickJS PatrickJS dismissed wmertens’s stale review May 1, 2024 00:06

fine for now. any more should be larger refactor with tests

@PatrickJS PatrickJS merged commit 916982d into QwikDev:main May 1, 2024
21 checks passed
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.

None yet

4 participants