I have a git clone of an npm package which i have modified that works perfectly when I use yarn link <project name>
to add it to a project locally. However, when I push it to GitHub and use yarn add <repo url>#<branch>
in the same project instead of yarn link
, I get a compilation error indicating that the typescript/ES6 has not compiled:
SyntaxError Plugin: Unexpected token *
Which relates to this line in the package I am adding:
import * as path from 'path'
How can I get yarn add
to compile the typescript/ES6 on the fly from the GitHub version just like yarn link
does with the local version?
I'd rather not build it and commit the result to git as that adds an extra compilation step every time, which I or others might forget.
Also for clarity: I'm not building and pushing to npm as it's a fork of a package that I don't own.