shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
987 stars 33 forks source link

fix(jsx-email): revert excluding jsx-email+react during build. fixes #137 #138

Closed shellscape closed 8 months ago

shellscape commented 8 months ago

Component / Package Name: jsx-email

This PR contains:

Are tests included?

Breaking Changes?

If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers: fixes #137

Description

This commit https://github.com/shellscape/jsx-email/commit/e0a7eb44a96b85fed54d918bd3a05b788606267d#diff-956e216fa7df03ccf64dcfcbe8fdacf5560897b6726255ff29c1c3c8cc757721R124 had the goal of reducing the size of the intermediary template output file which esbuild produces, and thus increasing speed. Unfortunately the way that pnpm, yarn, and npm differ in how they create binaries in node_modules/.bin causes an issue where yarn and npm have no idea about the path context of where the intermediate file will be run, hence it can't find node_modules and jsx-email.

Under pnpm, the binary file in node_modules/.bin contains path information whereas npm and yarn are just straight up copies of the target file. Under pnpm, the compiled template file has context as to where it's being run, so it can use the local node_modules. Apparently on npm/yarn, this is not the case.

shellscape commented 8 months ago

Should be all set on 1.7.3