7ebb64846c
This makes the argument to `embed_file!` relative to the package it is invoked from, instead of relative to the file it is invoked from. The latter is closer to how `include_*!` works, but it has a couple of issues: * Since `file!` returns a path relative to the workspace, it requires knowing the full path to the workspace. However, this is undefined when the package is compiled from outside of the workspace (e.g. as a dependency of another package). * Procedural macros don't have access to the path of the file where they were originally invoked [(although we could get it with #[feature(proc_macro_span)])](https://doc.rust-lang.org/proc_macro/struct.Span.html), which means that an `embed_dir` macro would not be able to be relative to the invoker file anyway. So this makes things more consistent for such a (to be implemented) macro. |
||
---|---|---|
.. | ||
next_client | ||
next_js | ||
nodejs | ||
server_render | ||
embed_next.rs | ||
env.rs | ||
lib.rs | ||
next_import_map.rs | ||
react_refresh.rs | ||
server_rendered_source.rs | ||
web_entry_source.rs |