dan-cooke / remix-sse

Server Sent Events (SSE) for the remix framework
Apache License 2.0
71 stars 3 forks source link

Use flat file structure in build output #14

Closed dan-cooke closed 7 months ago

dan-cooke commented 10 months ago

v4 broke the flat file structure previously in v3 we had

import { RemixSSEProvider } from “remix-sse /client

Now we have this

import { RemixSSEProvider } from “remix-sse /dist/client

this happened because I wanted to align the examples directory with how users actually import the project. Therefore I ended up using workspaces to import the library.

The issue is because the local dev version of the project has a different structure to the published output - the symlinks don’t resolve the main index file properly.

potential solutions

  1. Copy build assets and package json over on prepublish - use a script to modify the package json main/types fields accordingly.

  2. Revert to importing ts source files directly in the example repos and resolve build issue we had with remix v2

I prefer option 1 as it keeps the examples in line with actual use

dan-cooke commented 7 months ago

Fixed in #17

See new @remix-sse/client and @remix-sse/server packages