Treat all unknown extensions as resources
See original GitHub issueI’m getting a bit tired of extending our whitelist like in #665.
I think we should have a “catch all” loader that uses file-loader
for any unknown extensions.
This makes sense because it’s easy to explain: “if you import something that isn’t JS or CSS, it becomes a part of the build, you get its filename, and can do whatever with it”.
I think @dralletje planned to look into this.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:23
- Comments:22 (20 by maintainers)
Top Results From Across the Web
How to make VS Code treat a file extensions as a certain ...
Go to VS_CODE_FOLDER/resources/app/extensions/ and there update package.json ... You can add the md.html extension to your settings.json file associations ...
Read more >8 Ways To Identify Unknown File Types - MakeUseOf
Google knows everything. I think it does know about all file types too as it sources the details from a few sites we...
Read more >Error of Unknown file extension ".svelte" in SvelteKit #375
I tried and it works great. It seems that the temporary solution is to add these fields to all components installed inside @smui...
Read more >How To Open File With UNKNOWN Extension?
If the systems has insufficient resources to open UNKNOWN files, try closing all currently running applications and try again. 5. Ensure that ...
Read more >Visual Studio Code Workspace Trust security
The Workspace Trust feature lets you decide whether code in your project folder can be executed by VS Code and extensions without your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looking at webpack.config.dev.js, I’m wondering: why use url-loader for audio / video, but file-loader for images? In the scenarios I’m most familiar with, you’d usually do the complete opposite of that: you want essential images, like sprite sheets, to load immediately, but sound and video can wait.
I think this using file-loader for unknown resources is a good default.
Thanks Dan for sharing my messages to you. Yes, the transform field is meant to be used for this. If you guys are building
css-jest
andscss-jest
and all, I’m happy to support this officially in Jest – this was my long term plan so we can also have style information in JS, just like we do in react-native:etc.