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

compile TypeScript folder in advance #32

Closed
jiawei397 opened this issue Feb 14, 2023 · 4 comments
Closed

compile TypeScript folder in advance #32

jiawei397 opened this issue Feb 14, 2023 · 4 comments

Comments

@jiawei397
Copy link

Is there any way to compile the target TypeScript folder in advance?

In addition, it would be better if you could control whether to generate sourcemap.

@ayame113
Copy link
Owner

Is there any way to compile the target TypeScript folder in advance?

Lume, a static site generator, is probably the best choice for this purpose! The esbuild plugin allows you to compile any typescript you have in a folder in advance.

In addition, it would be better if you could control whether to generate sourcemap.

I'd like to do this, but first I need to resolve denoland/deno_emit#29, an upstream issue.
(please see also denoland/deno_emit#83.)

@jiawei397
Copy link
Author

As for the first point, I mean how to pre-cache when using your tool library. If I use it in production, It is better precompile the ts file first. Because I found that one of my ts files, although not large, took 1 second for the first time, which may be a serious problem in production.

@ayame113
Copy link
Owner

Because I found that one of my ts files, although not large, took 1 second for the first time

In that case, it may be taking a long time to read the wasm file. Why not try fourceInstantiateWasm function? (Sorry if you've already tried it.)

@jiawei397
Copy link
Author

Very good. This may be what I need.

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