Parcel: Parcel adds dot to file with no extension.

Created on 11 Nov 2019  ยท  2Comments  ยท  Source: parcel-bundler/parcel

๐Ÿ› bug report

When using a file with no extension as an entrypoint parcel adds a dot to the end of the file name when building.

% mkdir example
% cd example
% uuidgen >ping
% parcel build ping
โœจ  Built in 66ms.

dist/ping.    37 B    12ms

๐Ÿค” Expected Behavior

I should get the ping file copied into the output folder.

๐Ÿ˜ฏ Current Behavior

It gets renamed to ping.

๐ŸŒ Your Environment

% parcel --version
1.12.4
Feature

Most helpful comment

There are always random files that you want to serve from your site. In this case I'm making a simple ping URL to use for monitoring. However I can also imagine examples like executable file downloads which typically don't have extensions.

I understand that I won't be getting transformations because of the minimal information that Parcel has, however it is still useful to have it copy them over.

All 2 comments

What is your usecase here? Parcel determines the filetype based on the extension, so I don't see how this could be useful.

There are always random files that you want to serve from your site. In this case I'm making a simple ping URL to use for monitoring. However I can also imagine examples like executable file downloads which typically don't have extensions.

I understand that I won't be getting transformations because of the minimal information that Parcel has, however it is still useful to have it copy them over.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mnn picture mnn  ยท  3Comments

will-stone picture will-stone  ยท  3Comments

dsky1990 picture dsky1990  ยท  3Comments

davidnagli picture davidnagli  ยท  3Comments

donaldallen picture donaldallen  ยท  3Comments