Skip to content

Move to ECMAScript ES Module Import statements from require #9316

Closed
@R3D347HR4Y

Description

@R3D347HR4Y

New Feature / Enhancement Checklist

Current Limitation

Using require is the old way of coding, most of my code needs to be converted to this crappy syntax when moving to cloud code

Feature / Enhancement Description

Use import instead of require in the whole project

Example Use Case

Not having to rewrite code to an old way of doing

Alternatives / Workarounds

Thanks to @mtrezza here is a workaround:
Creating a main.cjs file in the cloud folder and pointing to it in the Parse Server Config

(async () => {
  await import('./main.js');
})();

3rd Party References

Litteraly every single big node based project
Would also recommend using hono and deno to get a massive performance boost

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:duplicateDuplicate of already reported issuetype:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions