Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader dataurl can't load some patterns #743

Closed
benjaminbours opened this issue Feb 3, 2021 · 3 comments
Closed

Loader dataurl can't load some patterns #743

benjaminbours opened this issue Feb 3, 2021 · 3 comments

Comments

@benjaminbours
Copy link

Hi, I'm evaluating your tool for a company, and we are using this javascript library => https://blueprintjs.com.

In our CSS, we import some style sheets from them:

@import '@blueprintjs/core/lib/css/blueprint.css';
@import '@blueprintjs/icons/lib/css/blueprint-icons.css';
@import '@blueprintjs/datetime/lib/css/blueprint-datetime.css';

And in their style sheets, they import some file with this syntax:

@font-face{
  font-family:"Icons20";
  font-style:normal;
  font-weight:normal;
  src:url("../../resources/icons/icons-20.eot?#iefix")

That leads to compilation error:
2021-02-03_09-02

Remove the part ?#iefix after the .eot solve the issue. Is that an unsupported use case or am I not using the right loader? I did try with the file one and not much luck.

@evanw
Copy link
Owner

evanw commented Feb 3, 2021

I assume the problem is that there is no path with the .eot?#iefix extension on the file system. You should be able to solve this with an on-load plugin that remaps the path from your path format to the underlying file system path so esbuild knows which file to load: https://esbuild.github.io/plugins/#resolve-callbacks.

@benjaminbours
Copy link
Author

Indeed, it solves it, thanks for the help, and for this great tool :)

@nsainaney
Copy link

@benjaminbours I have the same issue. Can you please post your solution? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants