File name support with extra periods

Are there plans for ReScript support to support files with multiple periods effectively supporting React Server Components when they are released? I’ve also seen other use-cases for this such as documentation tooling (React Cosmos).

Examples:
Component.server.res
AnotherComponent.client.res

React Server Components RFC: rfcs/0000-server-components.md at server-components · josephsavona/rfcs · GitHub

Does this not work already? I thought ReScript added support for exotic file names a while ago.

You’re totally right. Where I got hung up is that you can’t have the following scenario (which would be useful I think for tests and doc tools like React Cosmos):

Component.res
Component.test.res
Component.fixture.res

It looks like this wouldn’t be an issue for React Server Components though.

1 Like

I am thinking about supporting some cp features in the build system instead.
So you have Component_test.res, in the build system, we get Component_test.js but also
do a copy to Component.test.js

2 Likes