-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support mjs files as entrypoints #225
Comments
I can take a look at this as a follow on to paketo-buildpacks/libnodejs#8 @SaschaSchwarze0 is your suggestion just that it looks for the same files with an mjs extension in addition to the .js ones ? One question is also how it should affect the ordering. My first take would be same ordering in terms of server, app etc. but look for both |
Makes sense, yes. Thank you. |
@nodejs/maintainers does what I outlined in #225 (comment) sound good to you? If so I'll submit a PR once some of the existing ones I have open land. |
opps wrong mention @paketo-buildpacks/nodejs-maintainers does what I outlined in #225 (comment) sound good to you? If so I'll submit a PR once some of the existing ones I have open land. |
But can't you simple add the environment variable |
Yep, this is more about what works ootb without that you must customize something. Is imo hard to explain that you evolve your app to modules, by that use mjs as extension and suddenly the build does not work anymore (without env customization). |
This dropped off my radar, will try to get back to it. |
Refs: paketo-buildpacks/node-start#225 Signed-off-by: Michael Dawson <[email protected]>
Submitted - paketo-buildpacks/libnodejs#31 as the first step. Once that lands we can add some additional testing into this buildpack to validate the .mjs cases. |
Refs: paketo-buildpacks/node-start#225 Signed-off-by: Michael Dawson <[email protected]>
Refs: paketo-buildpacks/node-start#225 Refs: paketo-buildpacks#31 Signed-off-by: Michael Dawson <[email protected]>
Refs: paketo-buildpacks/node-start#225 Refs: #31 Signed-off-by: Michael Dawson <[email protected]>
Fixes: paketo-buildpacks#225 - add support for mjs and cjs files when looking for applications Signed-off-by: Michael Dawson <[email protected]>
Fixes: paketo-buildpacks#225 - add support for mjs and cjs files when looking for applications Signed-off-by: Michael Dawson <[email protected]>
The node-start buildpack at the moment looks just for js files as start scripts, https://github.com/paketo-buildpacks/node-start/blob/v0.8.1/node_application_finder.go#L32. If I use ECMAScript modules and therefore
import
statements and name my file with mjs as extension, then it won't work.A sample code repository that today cannot be built is https://github.com/SaschaSchwarze0/dump-headers.
Describe the Enhancement
Extend node-start to also look at mjs files.
Possible Solution
This must be extended at those places:
Motivation
Adoption of ECMAScript modules is growing.
The text was updated successfully, but these errors were encountered: