codesandbox-client
codesandbox-client copied to clipboard
feat(sandpack): css url processing
What kind of change does this PR introduce?
Process css urls
Closes CSB-4095
CSB-4095 Bundler: CSS url ressources are not being resolved
CodeSandbox: https://codesandbox.io/s/f4msyx?file=/src/App.tsx:143-168
The sandbox above is trying to load an icon library, which is pretty much a CSS file with some fonts call. However, the font calls are resolving to the sandbox itself (https://f4msyx.csb.app/fonts/primeicons.ttf) instead of the node_modules content.
Can we load the CSS as a file instead of injecting it into the body? Or what is the possible solution for it?
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit b45b0ef5c9d24c1d86b53f98e0149d11dd921877:
| Sandbox | Source |
|---|---|
| Notifications Test | Configuration |
Build for latest commit https://github.com/codesandbox/codesandbox-client/pull/6655/commits/b45b0ef5c9d24c1d86b53f98e0149d11dd921877 is at https://pr6655.build.csb.dev/s/new.