-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
How to work with static assets like fonts, images without to reference them? #317
Comments
your possible solution is the current behaviour, except it's an object not an array.
if you want an array, you can use |
Fonts should always be referenced with an I assume that Parcel handles font loads with its |
@chee I try it again and it works now. Very curious could be an issue with the cache. |
But parcel is not able to watch for newly created directories. |
But vscode shows error when editing: Any info that I can clear this error please? |
Having the same issue as @shunia, any update on this? Ended up doing a |
using |
If TypeScript is yelling at you about the module name you can create a file named declaration.d.ts declare module "assets/**" |
Parcel does already support globs and watch/invalidate them properly |
I'm trying to use
Help! 😉 |
https://parcel2-docs.now.sh/getting-started/migration/#importing-non-code-assets-from-javascript import logo from "url:./logo.svg";
document.body.innerHTML = `<img src="${logo}">`; |
Hi, how it is possible to import dynamic content like fonts or images which aren't references in code?
😯 Current Behavior
💁 Possible Solution
babel-plugin-wildcard
🔦 Context
Importing a bunch of static assets e.g to include fonts or images which aren't directly referenced in the code e.g parcel does not interpret sass variables.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: