tj / consolidate.js

Template engine consolidation library for node.js
3.48k stars 353 forks source link

React not working #347

Open Jarco-dev opened 1 year ago

Jarco-dev commented 1 year ago

When ever i try to use consolidate.react it throws this error on the first < it finds am i doing something wrong / am i missing something or is this something wrong with the package

image

jared-leddy commented 1 year ago

Yeah man. I'm getting an error too. No idea why.

{
  "statusCode": 400,
  "message": "Cannot use import statement outside a module",
  "error": "Bad Request"
}
jared-leddy commented 1 year ago

@Jarco-dev what's your file test.tsx look like?

Jarco-dev commented 1 year ago

@Jarco-dev what's your file test.tsx look like?

To be honest I don't have it anymore as I gave up and ended up switching to ejs as the driver instead of react although I would've highly preferred react if it worked.

But it was about as simple of a react component as possible if i remember correctly it was literally a function returning the h1 you can see in the error

titanism commented 1 year ago

We have forked this repository for maintenance and released it under @ladjs/consolidate, see https://github.com/ladjs/consolidate.js. We have merged PR's and updated it for email-templates. Please click the "Watch" button to get notified of all releases at https://github.com/ladjs/consolidate.js. Thank you 🙏

Screen Shot 2023-06-08 at 3 05 12 PM

PR welcome at the new repo once new release is published today!

titanism commented 1 year ago

v1.0.0 of consolidate has been released (and mirrored to @ladjs/consolidate) 🎉

watch/follow https://github.com/ladjs/consolidate for updates and to submit future issues and PR's