I use Babel really simply, by outputing the transpiling to a folder ".cache". I can then package the app by using .cache/index.js as the input.
What happened:
When building a package with ".cache/index.js" as input, nothing (or almost?) gets included in the package. I get a MODULE_NOT_FOUND citing the ".cache/index.js" file.
If I change Babel's output directory to "cache" (without the ".") and point nexe to "cache/index.js", everything works perfectly fine.
What you expected to happen:
Files should be included in the package. I think this may be a resolve-dependencies bug.
How to reproduce it (as minimally and precisely as possible):
.cache folder with an index.js file insideAnything else we need to know?:
I'm using the latest version of everything.
I did not test with "." at the end of the name, nor in the middle. Didn't try other characters also.
Environment:
Can you try npm i nexe@next?
Can confirm the problem is still happening with 4.0.0-beta.10 on Windows.
The output executable is significantly smaller at 13MB instead of 28MB.
Hmm I see what you mean. You can use --cwd .cache potentially to get around it for now.
Yup, that workaround does work perfectly!
I was able to add a failing test in resolve-dependencies. I'll take a look when I have some free time.
4.2.2 of resolve dependencies has this fix. beta.10 should pick that up if you reinstall