codesandbox-client icon indicating copy to clipboard operation
codesandbox-client copied to clipboard

feat(sandpack): css url processing

Open DeMoorJasper opened this issue 3 years ago • 3 comments

What kind of change does this PR introduce?

Process css urls

Closes CSB-4095

DeMoorJasper avatar Apr 22 '22 19:04 DeMoorJasper

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?

Screenshot 2022-04-11 at 14.20.34.png

linear[bot] avatar Apr 22 '22 19:04 linear[bot]

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

codesandbox-ci[bot] avatar Apr 22 '22 19:04 codesandbox-ci[bot]

Build for latest commit https://github.com/codesandbox/codesandbox-client/pull/6655/commits/b45b0ef5c9d24c1d86b53f98e0149d11dd921877 is at https://pr6655.build.csb.dev/s/new.

lbogdan avatar Apr 22 '22 19:04 lbogdan