codelab
codelab copied to clipboard
Upgrade raw loader
trafficstars
What the issue is about
Starting with v2 (or v3) webpack raw loader is using es imports, which results in a change of behavior.
Before:
require('!!raw-loader!1.txt') returned a string
Now:
require('!!raw-loader!1.txt') returns a module with a default property which contains the text
We should investigate what would be the best way to upgrade the module
Where to start
- Search for
raw-loader!across the codebase to find all the usages - Upgrade
raw-loaderin package.json to