Skip to content

Use Pirates #1

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

Closed
ariporad opened this issue Dec 24, 2015 · 3 comments
Closed

Use Pirates #1

ariporad opened this issue Dec 24, 2015 · 3 comments

Comments

@ariporad
Copy link

Hi @jamestalmage,

I noticed that your require hook isn't properly respecting the require chain. If I submit a PR, would you consider using pirates to do it properly?

Thanks!

@jamestalmage
Copy link
Contributor

Continuing down the chain defeats the whole purpose of this module. It does respect the chain if precompile returns a falsy value. The idea is to grab from a cache or some other precompilation source instead of continuing down the chain. This requires that you have control over the transorms that come before you if you don't want problems. See my babel-in-main-thread branch/PR for AVA. it provides significant speed up.

Obviously, there is danger here if you don't know what you are doing - but I don't think it can be helped in this case.

@jdalton
Copy link

jdalton commented Dec 23, 2017

I was just going to suggest pirates too.
The chain dead-ending is causing problems and there's no way to prevent the precompile bit.

@jamestalmage
Copy link
Contributor

I am certainly open to discussing a solution to the problems @std/esm is having, but pirates isn't a viable solution. The whole point of this module is to short-cut the chain. We use it for test sources which we precompile in the main thread to avoid loading Babel in every test thread. This has offered significant performance gains we aren't keen to give up.

I've done some poking around, andrequire-precompiled isn't actually the issue. I'll have a PR for AVA shortly.

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

4 participants