Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.0.0 is in beta #229

Closed
jayair opened this issue Apr 20, 2021 · 21 comments · Fixed by #257
Closed

v5.0.0 is in beta #229

jayair opened this issue Apr 20, 2021 · 21 comments · Fixed by #257

Comments

@jayair
Copy link
Member

jayair commented Apr 20, 2021

A huge thanks to @thomaschaaf for putting this together. It includes:

  • Webpack 5 update
  • Esbuild loader option
  • eslint-webpack-plugin instead of eslint-loader

Refer to the original PR #208.

Please help us test it. We are creating canary releases.

$ npm install --save-dev serverless-bundle@canary
@jayair
Copy link
Member Author

jayair commented Apr 20, 2021

@thomaschaaf we need to update the README. Is the esbuild option the only thing we need to add to it?

@joewestcott
Copy link

Hi both, I'm receiving this error after upgrading to 5.0.0-beta.0 from v4.2.3:

Error: Failed to load config "medikoo" to extend from.
Referenced from: ../node_modules/2-thenable/package.json

Setting custom.bundle.disableForkTsChecker to true does resolve the issue though.

@jayair
Copy link
Member Author

jayair commented Apr 20, 2021

@joewestcott Is this while bundling TS files?

@joewestcott
Copy link

@joewestcott Is this while bundling TS files?

Yes, removing the tsconfig.json file also solves it

@jayair
Copy link
Member Author

jayair commented Apr 21, 2021

@joewestcott It looks like a fix that we had in https://github.com/AnomalyInnovations/serverless-bundle/releases/tag/v4.2.3 has not been merged here. That should resolve this.

@thomaschaaf I ran into a strange issue that I'm hoping you can take a look at. I was trying to merge some changes but when I regenerate the package lockfile for this branch, the Lambda functions aren't being transpiled anymore.

I created a branch to test this and here's a PR to compare the changes #230.

Here are the steps to reproduce.

  • Delete the package lockfile
  • Remove the node_modules dir
  • Run npm install
  • Head over to tests/base and run serverless invoke local -f hello. It should fail with SyntaxError: Unexpected token 'export'

Let me know if you are able to reproduce the issue.

@jayair
Copy link
Member Author

jayair commented Apr 21, 2021

Just digging into this a bit more, I wonder if it has to do with the version of Serverless Framework. I'm using 2.37.0. If anybody else can try this out that would be helpful.

@thomaschaaf
Copy link
Contributor

thomaschaaf commented Apr 21, 2021

Yeah I had to stay at serverless v2.29.0 else the tests failed. 2432f14 I have not had time to analyze why it fails afterwards.

@jayair
Copy link
Member Author

jayair commented Apr 21, 2021

Yeah I found this as well. It seems like the recent versions of Serverless Framework are completely breaking this? Does anybody want to take a look at whats going on?

@thomaschaaf
Copy link
Contributor

I found it: Rename servicePath vars to serviceDir (#9307) (e8c8f1c) (Mariusz Nowak) I will make a new pr.

@jayair
Copy link
Member Author

jayair commented Apr 21, 2021

Appreciate it!

@jayair
Copy link
Member Author

jayair commented Apr 21, 2021

Is it this https://github.com/AnomalyInnovations/serverless-bundle/blob/master/index.js#L79?

If you are making the change, can you do it in master instead?

@thomaschaaf
Copy link
Contributor

thomaschaaf commented Apr 21, 2021

2.37.1 brings back the old behavior. So there is actually nothing to be done except not using 2.36.0 or 2.37.0. See my PR.

@jayair
Copy link
Member Author

jayair commented Apr 22, 2021

Thanks for looking into it. Serverless Framework versions aren't very reliable.

@jayair
Copy link
Member Author

jayair commented Apr 22, 2021

@joewestcott Pushed 5.0.0-beta.1 with a fix for that issue.

@joewestcott
Copy link

@joewestcott Pushed 5.0.0-beta.1 with a fix for that issue.

Lovely! Thanks both for your efforts. Upgrade to v5.0.0-beta.1 is seemless now and without issues, as far as I can tell.

I did try to enable custom.bundle.esbuild though, and got this during build with my handler:

ERROR in path/to/handler
Module not found: Error: Can't resolve 'esbuild-loader' in '/node_modules/serverless-bundle/src'

Installing esbuild-loader in my repo solved the issue, but didn't have an effect on the build time, unfortunately.

@thomaschaaf
Copy link
Contributor

I will enable esbuild for minimization (https://github.com/privatenumber/esbuild-loader#js-minification-eg-terser) in my next PR. But for replacing tsc it's not better because webpack is the bottleneck.

@jayair
Copy link
Member Author

jayair commented Apr 23, 2021

Merged #235

Cut a new release v5.0.0-beta.2 with it.

@henhal
Copy link

henhal commented Jun 11, 2021

FWIW: I verified that this solved issues I had with private class fields when using serverless-bundle 4.3.1. 👍 👍

@jayair
Copy link
Member Author

jayair commented Jul 18, 2021

Awesome! Hey all, I'd like to merge this. Anybody run into any issues with this?

@alert-debug
Copy link

Thanks for your work on this @jayair. It's been a month since you asked if anyone has had issues with it, and apparently v5.0.0-beta.2 has been getting 60 downloads per week, so hopefully that gives some confidence that it is being used. Is there anything blocking a final v5.0.0 release now?

@jayair
Copy link
Member Author

jayair commented Aug 23, 2021

It's live!

https://github.com/AnomalyInnovations/serverless-bundle/releases/tag/v5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants