unable to run tailwind.js due to SYNTAX error
dzonerzy opened this issue · 2 comments
Hi, I'm trying to run a build of tailwindcss made with esbuild, should be a es module 2020 compliant but I get the following error:
SyntaxError: SyntaxError: (anonymous): Line 451:3271 Unexpected token ILLEGAL (and 57 more errors)
Attached the code
Hi,
First of all, goja does not fully support 2020 (or even ES6) syntax yet.
Secondly, please try to reduce it to a simple runnable testscase.
Tailwind also uses some Node-specifics, but you can use ESBuild to shim out most of those calls. I have a PoC working with V8 over here: https://github.com/livebud/tailwind.
It should also be possible to get working with Goja, but likely needs a bit of additional polyfilling and down-versioning. FWIW, I'd accept any PRs to get it working with Goja, that'd be preferable to V8.