preact-cli icon indicating copy to clipboard operation
preact-cli copied to clipboard

What does this '(0, _path.resolve)(env.src, position.source)' means?

Open ccontreras opened this issue 8 years ago • 2 comments

Hi @developit, I have been digging into the code of the project and I've came across with this statement:

(0, _path.resolve)(env.src, position.source)

Could you explain what are the pros of this?

Thank in advance.

ccontreras avatar Feb 26 '18 16:02 ccontreras

it's from babel

ForsakenHarmony avatar Feb 26 '18 17:02 ForsakenHarmony

Yup yup. I think what you're looking at is originally this line

Babel + Webpack compilation uglies it a bit in order to safely handle import statements & whatnot. 😄

lukeed avatar Feb 26 '18 18:02 lukeed