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

Migrate examples to type: module #4662

Merged
merged 6 commits into from
Sep 13, 2022
Merged

Migrate examples to type: module #4662

merged 6 commits into from
Sep 13, 2022

Conversation

natemoo-re
Copy link
Member

Changes

  • Moves examples to use "type": "module" in their package.json files.
  • This aligns us with vite starters
  • This is NOT changing any behavior for existing projects, just setting new users up with the best defaults.
  • This might fix some issues with dependencies being resolved to their CJS versions in SSR while Vite resolves to their ESM version on the client...
  • Allows us to default to astro.config.js instead of the defensive astro.config.mjs

Testing

Manually

Docs

/cc @withastro/maintainers-docs for feedback!

We'd likely want to pair this change with a change to our docs to recommend astro.config.js with "type": "module" in the package.json file.

@changeset-bot
Copy link

changeset-bot bot commented Sep 7, 2022

🦋 Changeset detected

Latest commit: ddf7c39

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

This PR includes changesets to release 2 packages
Name Type
@astrojs/tailwind Patch
@e2e/e2e-tailwindcss Patch

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: example Related to an example package (scope) label Sep 7, 2022
@natemoo-re natemoo-re requested a review from a team September 7, 2022 19:28
@natemoo-re
Copy link
Member Author

We agreed to move forward with this but rollback the change from astro.config.mjs => astro.config.js. Also going to give @delucis some time to make sure our docs are in order first!

@delucis
Copy link
Member

delucis commented Sep 9, 2022

Thanks for waiting @natemoo-re! I’ve opened withastro/docs#1514 to make the necessary docs changes.

I’d also like to change one line in the Tailwind integration README:

config: { path: './custom-config.js' },

Want to update that .js extension to .cjs as part of this PR?

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Sep 9, 2022
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of that docs change!

@natemoo-re natemoo-re merged commit 8cfb3fb into main Sep 13, 2022
@natemoo-re natemoo-re deleted the chore/examples-to-module branch September 13, 2022 19:02
@astrobot-houston astrobot-houston mentioned this pull request Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: example Related to an example package (scope) pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants