Add native support for importing `.txt` files
marvinhagemeister opened this issue · 1 comments
marvinhagemeister commented
Is your feature request related to a problem? Please describe.
Being anle to import a .txt
file as a plain string.
Describe the solution you'd like
import text from "./foo.txt";
console.log(typeof text);
// logs: "string"
Describe alternatives you've considered
Custom plugins
Additional context
Ran into that with the examples on preact-www
marvinhagemeister commented
Closing, while it seems nice initially @developit rightfully mentioned that doing so would inline the full string into the bundle. In most cases one would likely want to precompile the txt file.