+You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF. For images less than 10,000 bytes, importing them will return a `data:` URL instead of a path, so that they are inlined instead of requiring an extra request to the server to fetch them. To be clear, importing any file with an unknown extension will return the final path to that file.
0 commit comments