这是indexloc提供的服务,不要输入任何密码
Skip to content

How can include all depencies in the final index.js ? #619

@Suniron

Description

@Suniron

Hi,

I think that my question is about a basic usage but I can't find instruction in documentation or other issues and discussions..

So, I want to build a single index.js wich inclue all other typescript files (it's already good for that) and all depencies, on a typescript project.

Actually, if i do a tsup src/index.ts at root, a dist folder is built with the famous index.js inside.
But, this index.js work only in this dist folder (or at root of project).

So, if I put this file on my production server (without any package.json or node_modules folder), and I do a node index.js, some error are printed to say that modules aren't found (package.json depencies).

Could you help me to find the correct arguments to include all depencies at build time 🙏.

Thanks by advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions