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

Remove default entry point #14

Merged
merged 4 commits into from
Jun 14, 2022
Merged

Remove default entry point #14

merged 4 commits into from
Jun 14, 2022

Conversation

jessarcher
Copy link
Member

To avoid a flash of unstyled content with Blade apps, we needed to specify a CSS entry point so that we can load a <link rel="stylesheet"> tag in HMR mode.

However, for SPAs, this results in a different flash of unstyled content due to the DOM being updated slightly before the new <link> tag is loaded. Therefore it is preferable with SPAs to import the CSS via the JavaScript entry point as we had previously.

Given that it doesn't seem possible to create an optimal experience for both SPAs and Blade apps with the same default entry point(s), this PR removes the default entirely so that they must be specified explicitly.

This will of course be configured appropriatly for the stack by Breeze and Jetstream.

The optimal entry points are different between Blade apps and SPAs so
this removes the default entry point in favour of specifying them
explicitly for each use case.
@jessarcher jessarcher requested a review from timacdonald June 13, 2022 05:50
With no default primary entry point, it seems weird to have a default
SSR entry point. This also brings equity to Vue and React set ups where
React had to override the defaults with a .jsx extension.
@jessarcher jessarcher force-pushed the remove-default-entrypoint branch from d787cf4 to 5f9dfb3 Compare June 13, 2022 10:55
Copy link
Member

@timacdonald timacdonald left a comment

Choose a reason for hiding this comment

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

I still feel it would be nice to provide defaults for those that we can and just make blade apps specify entry points, but LGTM and we can circle back if we feel it is worthwhile.

@timacdonald timacdonald merged commit 28d78e8 into main Jun 14, 2022
@jessarcher jessarcher deleted the remove-default-entrypoint branch June 14, 2022 01:22
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.

2 participants