#convex file case

4 messages · Page 1 of 1 (latest)

slow hull
#

<@&1228088700710293556> does convex expect the file in the /convex dir to be camel case only? can i have HelloWorld.tsx or only helloWorld.tsx works?

#

@dry halo does convex expect the file in the /convex dir to be camel case only? can i have HelloWorld.tsx or only helloWorld.tsx works?

dry haloBOT
#

Let me check the knowledge base for you. One moment! :books:

#

Based on the information from the Discord support threads, it seems that Convex does not strictly require files in the convex directory to be camel-cased. However, there have been issues reported with using kebab-case (e.g., insert-inventory-update.js) for Convex functions. The support staff mentioned that this is a bug that needs to be fixed.

As for using PascalCase (e.g., HelloWorld.tsx), there's no explicit information available in the provided sources. However, considering that Convex is built to work with JavaScript and TypeScript, which do not enforce a specific case for filenames, it's likely that PascalCase should work.

Please note that the filename casing might affect how you refer to the functions in your code. For example, if you have a function in a file named HelloWorld.tsx, you might need to refer to it as HelloWorld.functionName in your code.

For the most accurate and up-to-date information, I recommend checking the official Convex documentation or reaching out to the Convex support team.

Sources:


Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: