A means to import static files that need no processing.
Maybe an output dir variable (__outputDir) which Parcel converts to new relative paths during compilation. This should work in HTML, CSS and JS files.
For example, if I place say an image in dist/images/test.jpg, I should be able to use that in my index.html as something like <img src="__outputDir/images/test.jpg" /> which parcel converts to src="/images/test.jpg".
This could help in cases where Parcel needn't manually copy many files (such as images, icons etc) for larger projects, greatly reducing build time and effort.
Webpack has similar variables I believe: https://webpack.js.org/guides/public-path/
This could help in cases where Parcel needn't manually copy many files
In the end, you still have to "manually" copy them. So I don't see what advantage this would have.
This could be implemented using a named pipeline in Parcel 2 (e.g. raw: images/test.jpg).
Say there are about 100 large image files in the project which won't be updated later on after adding to the project. In such a case, doesn't this option reduce the load for copying files each time (I'm assuming Parcel copies all these files each time I run it and that contents of dist folder isn't deleted on each run) and this also prevents bloating of the project directory by eliminating 2 copies of the same file?
Right, static resources could be massive, such as videos, 3D models, textures, point clouds, etc. Copying them is not a solution.
Most helpful comment
Say there are about 100 large image files in the project which won't be updated later on after adding to the project. In such a case, doesn't this option reduce the load for copying files each time (I'm assuming Parcel copies all these files each time I run it and that contents of
distfolder isn't deleted on each run) and this also prevents bloating of the project directory by eliminating 2 copies of the same file?