Skip to content

Conversation

@shmolf
Copy link
Contributor

@shmolf shmolf commented Jan 8, 2022

Purpose: I dislike having to call addEntry multiple times, and would prefer the cleaner look of a single hash.

Example Usage:

Encore.addEntries({
  main: './path/to/main.js',
  secondary: './path/to/another/file.js',
});

This supports validation that any keys provided in the Object literal do not yet exist as an Entrypoint or Style Entrypoint.

Tests have also been updated.


Another new method (validateNameIsNewEntry) was also added to extract and consolidate logic related to checking for duplicate entrypoint names.

Tests for this other function have also been added.

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

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

This is really, really nicely done! I don't know if personally need the feature, but it's subjective, and you implemented this beautifully! 👍

@weaverryan weaverryan merged commit dd8a6a6 into symfony:main Jan 21, 2022
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