rsnext/packages/next-swc/crates/next-core
Alex Kirszenberg 7ebb64846c Make embed_file relative to package instead of invoker file (vercel/turbo#484)
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.
2022-10-10 13:35:42 +00:00
..
src Make embed_file relative to package instead of invoker file (vercel/turbo#484) 2022-10-10 13:35:42 +00:00
build.rs add basic next pages support (vercel/turbo#223) 2022-08-15 17:26:37 +00:00
Cargo.toml move ProcessEnv into turbo-tasks-env (vercel/turbo#462) 2022-10-06 20:36:36 +02:00