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

chore(vite): Rename entry-client.tsx to entry.client #8592

Merged
merged 6 commits into from
Jun 14, 2023

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Jun 12, 2023

Renames the Vite entry point from entry-client to entry.client as per discussion during CTM.

⚠️ Note:
This is sort-of a breaking change - if user's already opted in to Vite. We need to find a good place to mention this in the release notes.

@dac09 dac09 added release:breaking This PR is a breaking change release:chore This PR is a chore (means nothing for users) and removed release:chore This PR is a chore (means nothing for users) labels Jun 12, 2023
@dac09 dac09 requested a review from cannikin June 13, 2023 03:37
@dac09
Copy link
Collaborator Author

dac09 commented Jun 13, 2023

@cannikin would you mind giving this a once over? Small change!

…into chore/rename-entry-client

* 'chore/rename-entry-client' of github.com:dac09/redwood:
  Move fastify.logger.infos to fastify.logger.traces (redwoodjs#8590)
  Make the fastify logger respect the LOG_LEVEL value set in the env (redwoodjs#8588)
  feat: Update the SDL types lib (redwoodjs#8586)
  Fix the codegen path for the GraphQL context objcet (redwoodjs#8585)
  chore(deps): update dependency @clerk/types to v3.42.0 (redwoodjs#8584)
  feat(codemod): Add codemod for js to jsx conversion (redwoodjs#8551)
@jtoar jtoar merged commit 3cfb6e3 into redwoodjs:main Jun 14, 2023
9 of 11 checks passed
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Jun 14, 2023
@dac09 dac09 modified the milestones: next-release, v6.0.0 Jun 14, 2023
const viteConfigPath = `${getPaths().web.base}/vite.config.${
ts ? 'ts' : 'js'
}`
const viteConfigPath = getPaths().web.viteConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

@dac09 this is coming up as null for me. Took a quick look and I think it's because resolveFile tries to find a file that exists, but in projects that aren't configured for Vite (the ones that would be more likely to use this command), there's no file, .js or .ts to resolve:

viteConfig: resolveFile(path.join(BASE_DIR, PATH_WEB_DIR_CONFIG_VITE)),

export const resolveFile = (
filePath: string,
extensions: string[] = ['.js', '.tsx', '.ts', '.jsx']
): string | null => {
for (const extension of extensions) {
const p = `${filePath}${extension}`
if (fs.existsSync(p)) {
return p
}
}
return null
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah right, ofcourse. That's probably why I did it this way before ;) I'll revert

@dac09 dac09 deleted the chore/rename-entry-client branch June 14, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:breaking This PR is a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants