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