Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(esbuild): add missing resolveDir to support webfont bundling (#789)
When attempting to bundle a font before, esbuild would complain: > linaria:App_hash.linaria.css:1:46: error: Could not resolve "./font.ttf" (the plugin "linaria" didn't set a resolve directory) 1 ? @font-face{font-family:"font";src:url("./font.ttf");}... With this fix the resolveDir is set to the basedir of the file loading the font (or other external asset) and thus relative paths should work just fine. Note: When testing this configure the esbuild build to include the appropriate loader, e.g.: loader: { ".ttf": "dataurl" },
- Loading branch information