denofn / denopack

The bundling and minification toolset, made for Deno
https://denopack.mod.land
MIT License
99 stars 8 forks source link

[BUG] Ignores directories in output filename/sourcemap #45

Open probins opened 3 years ago

probins commented 3 years ago

Describe the bug If the output filename includes a directory - subdir/output.js - it is ignored, and the file written to the current directory

To Reproduce Enter subdir/output.js in output file config.

Expected behavior FIle and sourcemap should be put in subdir.

Desktop (please complete the following information):

Additional context emitFiles.ts seems to be confusing the dir and file options. dir is for code splitting chunks, and isn't used for single build file. This bit of code needs rewriting.

probins commented 3 years ago

PS I just tested code splitting and multi-file input, and this seems to work nicely.