Allow relative assets in rust > 1.88 (#4658)
* Allow relative assets in rust > 1.88 and assets outside of the crate in binary crates * undo changes to assets outside of the crate * don't use relative assets in examples
This commit is contained in:
1 parent
707bde2986
commit
5104644b34
10 files changed
+28
-14
No files matched your search
@@ -4,6 +4,7 @@ use proc_macro2::{Span, TokenStream};
|
||||
use quote::{format_ident, quote, ToTokens, TokenStreamExt};
|
||||
use syn::{
|
||||
parse::{Parse, ParseStream},
|
||||
spanned::Spanned,
|
||||
token::Comma,
|
||||
Ident, Token, Visibility,
|
||||
};
|
||||
@@ -27,7 +28,7 @@ impl Parse for CssModuleParser {
|
||||
|
||||
// Asset path "/path.css"
|
||||
let (MacroString(src), path_expr) = input.call(crate::parse_with_tokens)?;
|
||||
let asset = resolve_path(&src);
|
||||
let asset = resolve_path(&src, path_expr.span());
|
||||
|
||||
let _comma = input.parse::<Comma>();
|
||||
|
||||
|
||||
Reference in new issue
Block a user