serverless-plugin-typescript icon indicating copy to clipboard operation
serverless-plugin-typescript copied to clipboard

feat: resolve tsconfig paths

Open perrin4869 opened this issue 3 years ago • 15 comments

Closes #180 This feature is behind a custom option which is turned off by default, so this PR is backwards compatible.

perrin4869 avatar Jul 08 '21 19:07 perrin4869

Nice work! Just a shame that there's no activity.

MichaelKilbane avatar Aug 13 '21 14:08 MichaelKilbane

Oh just noticed this was moved to the serverless org, there is hope after all! I'm maintaining my own fork with the 3 PRs I have, but holding out hope that one day I can move back to upstream haha

perrin4869 avatar Aug 14 '21 03:08 perrin4869

@perrin4869 when this change is going to be published?

m-alva avatar Aug 15 '21 15:08 m-alva

I'm not a maintainer, so no idea... I have 3 pending PRs in this repo for over a year, I'm waiting too...

perrin4869 avatar Aug 15 '21 15:08 perrin4869

Hi @perrin4869 ! I'm trying to use your fork in my Serverless project, how do I install it so that it understands which plugin to take? Appreciate any help :)

Ulydev avatar Oct 01 '21 17:10 Ulydev

This finally solves the issue I've been having, and I'm sure many others that have been trying to avoid using webpack.

One question is if I reference this branchunivapaycast/serverless-plugin-typescript#feature/tsconfig-paths in my package.json is there a way for it to autobuild? I'm getting tsc errors when I try to trigger it.

I'm adding it by doing this

yarn workspace foo add univapaycast/serverless-plugin-typescript#feature/tsconfig-paths

Note, I already have the serverless-* set up to nohoist so that's not an issue for the workspaces I'm using.

wweaver avatar Dec 13 '21 21:12 wweaver

This finally solves the issue I've been having, and I'm sure many others that have been trying to avoid using webpack.

One question is if I reference this branchunivapaycast/serverless-plugin-typescript#feature/tsconfig-paths in my package.json is there a way for it to autobuild? I'm getting tsc errors when I try to trigger it.

I'm adding it by doing this

yarn workspace foo add univapaycast/serverless-plugin-typescript#feature/tsconfig-paths

Note, I already have the serverless-* set up to nohoist so that's not an issue for the workspaces I'm using.

I got this working by building my own fork of this PR. This fixes the issue in question but since the code is based upon an old version of serverless-plugin-typescript it actually introduces a different issue that was working in the later version. Any chance this code could be easily upgraded to use the latest version of the servererless-plugin-typescript package? Maybe we can push them to merge it if it's updated? 🤞🏻

wweaver avatar Dec 14 '21 15:12 wweaver

This finally solves the issue I've been having, and I'm sure many others that have been trying to avoid using webpack. One question is if I reference this branchunivapaycast/serverless-plugin-typescript#feature/tsconfig-paths in my package.json is there a way for it to autobuild? I'm getting tsc errors when I try to trigger it. I'm adding it by doing this

yarn workspace foo add univapaycast/serverless-plugin-typescript#feature/tsconfig-paths

Note, I already have the serverless-* set up to nohoist so that's not an issue for the workspaces I'm using.

I got this working by building my own fork of this PR. This fixes the issue in question but since the code is based upon an old version of serverless-plugin-typescript it actually introduces a different issue that was working in the later version. Any chance this code could be easily upgraded to use the latest version of the servererless-plugin-typescript package? Maybe we can push them to merge it if it's updated? 🤞🏻

To follow up again. I actually had to revert and couldn't use the fork because it's based upon an old version of serverless-plugin-typescript and there were features that broke that I was utilizing. So still at a loss of how to add aliases without introducing webpack. Trying very hard to avoid webpack as it turns a package from 3MB to ~250MB.

wweaver avatar Jan 14 '22 16:01 wweaver

Hey, sorry I didn't look at this any longer. I am not using this module anymore, instead i use ts-node for running tests and rollup to pack the modules. I also use the relatively new package.json imports field to achieve the paths this PR was meant to implement. Please feel free to pick up this PR if you are still interested!

perrin4869 avatar Jan 14 '22 17:01 perrin4869

I ended up getting the plugin serverless-tscpaths to do what I needed in conjunction with serverless-plugin-typescript and serverless-plugin-optimize.

wweaver avatar Jan 20 '22 13:01 wweaver

Hi @medikoo, can you accept this PR?

AlanTaranti avatar Jan 26 '23 12:01 AlanTaranti

@AlanTaranti, this PR has conflicts that need to be resolved, once that's taken care of I can possibly take a look

medikoo avatar Jan 26 '23 13:01 medikoo

I fixed the conflicts real fast, but didn't test properly! May need some tuning

perrin4869 avatar Jan 26 '23 14:01 perrin4869

Any news on thise one ?

hadyrashwan avatar Jun 12 '23 10:06 hadyrashwan

Would be great to have it merged!

skix123 avatar Mar 22 '24 19:03 skix123