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

How can I build all imported files in addtion to the entrypoints? #3405

Closed
johann1301s opened this issue Sep 23, 2023 · 1 comment
Closed

Comments

@johann1301s
Copy link

The following is my code for building using esbuild.

import * as esbuild from 'esbuild'

esbuild.build({
    entryPoints: ['./src.ts'],
    outdir: 'out'
})

The following is src.ts.

import { foo } from "./foo";

console.log(foo)

And then foo.ts.

export const foo = 'bar'

How can I configure esbuild to build foo.ts in addtion to src.ts?

@johann1301s johann1301s changed the title How can i build all imported files in addtion to the entrypoints? How can I build all imported files in addtion to the entrypoints? Sep 23, 2023
@evanw
Copy link
Owner

evanw commented Sep 23, 2023

You don't, sorry. There is currently no easy way to do this with esbuild (although you could probably write some code yourself that uses esbuild to do it with an onResolve plugin that triggers more build calls). Closing as a duplicate of #708.

@evanw evanw closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2023
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

No branches or pull requests

2 participants