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

add warn message when using unsupported file types in pages/ #6851

Merged
merged 6 commits into from May 17, 2023
Merged

add warn message when using unsupported file types in pages/ #6851

merged 6 commits into from May 17, 2023

Conversation

timozander
Copy link
Contributor

Changes

  • add warning message when files with unsupported extensions are used in pages/

console output

Motivation

Occasionally, I messed up the file extensions and wondered why the page is not found. Especially since Vite just shows "updated file xyz", I think this warning message might be useful to the user

Testing

Tested with the projects from examples/, unit testing logging does not really make sense

Docs

Docs are not needed since this feature serves as a way to alert the user that something is wrong. Docs are already clear on which file extensions are allowed

@changeset-bot
Copy link

changeset-bot bot commented Apr 15, 2023

🦋 Changeset detected

Latest commit: 41263d3

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Apr 15, 2023
@bluwy
Copy link
Member

bluwy commented Apr 25, 2023

This seems like a nice addition, but it does make setups that "intentionally put images beside the page file so it can be imported relatively" show the warning. I don't think it's a big deal since we're introducing the src/assets convention, so I'm fine with this change.

Curious to hear what others think too.

Copy link
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

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

I like it :)

@Princesseuh Princesseuh merged commit e9fc2c2 into withastro:main May 17, 2023
13 checks passed
@astrobot-houston astrobot-houston mentioned this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants