Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auspice-client: Use import for image file
The new version of Auspice (which uses Webpack v5) uses a built-in Asset Module (asset/resource) to handle files that were previously handled with file-loader¹. file-loader in Webpack v4 is documented to handle both import and require()². Based on docs which suggest that asset/resource directly replaces file-loader³, I'd expect it to also support require(). It seems like that is not the case, so this is a workaround. ¹ nextstrain/auspice@7892c59 ² https://v4.webpack.js.org/loaders/file-loader/ ³ https://webpack.js.org/guides/asset-modules/
- Loading branch information