eploko / broccoli-watchify

Watchify plugin for Broccoli.
MIT License
6 stars 10 forks source link

Can't use path in outputFile property #4

Closed fredrikekelund closed 7 years ago

fredrikekelund commented 7 years ago

Thanks for the ambitious rewrite! I've had a lot of use for this module, happy to see it updated. I ran into an issue with the new version however, where it seems I can't specify directories in the outputFile property. If I do this:

var js = watchify("src/js", {
    browserify: { entries: ["./app.js"] },
    outputFile: "js/app.js",
    cache: true
});

I get the following error:

> Error: ENOENT: no such file or directory, open '/Users/fredrik/Documents/GitHub/oatly-oatfinder/tmp/watchify-output_path-drXhISoz.tmp/./js/app.js'

But if I use just a filename, then everything works as expected:

var js = watchify("src/js", {
    browserify: { entries: ["./app.js"] },
    outputFile: "app.js",
    cache: true
});

The first alternative worked previously, and while using broccoli-funnel to move the output file is very straightforward, it would still be cool to just be able to specify the output directory directly.

stefanpenner commented 7 years ago

even the readme claims this is possible.

Sorry for the late response, was sick all week.