rsnext/packages/next-swc/crates/next-core/src
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
..
next_client preset_env followup [1/2] (vercel/turbo#478) 2022-10-10 14:46:36 +02:00
next_js Support for App.getInitialProps/Page.getInitialProps (vercel/turbo#464) 2022-10-10 09:03:25 +00:00
nodejs Revamp errors and logging (vercel/turbo#467) 2022-10-10 06:24:54 +00:00
server_render prepare css for different types and transforms (vercel/turbo#477) 2022-10-09 11:47:33 +00:00
embed_next.rs Make embed_file relative to package instead of invoker file (vercel/turbo#484) 2022-10-10 13:35:42 +00:00
env.rs move ProcessEnv into turbo-tasks-env (vercel/turbo#462) 2022-10-06 20:36:36 +02:00
lib.rs Add support for pages/_app (vercel/turbo#442) 2022-10-07 11:36:44 +00:00
next_import_map.rs Support for App.getInitialProps/Page.getInitialProps (vercel/turbo#464) 2022-10-10 09:03:25 +00:00
react_refresh.rs Revamp errors and logging (vercel/turbo#467) 2022-10-10 06:24:54 +00:00
server_rendered_source.rs Add support for pages/_app (vercel/turbo#442) 2022-10-07 11:36:44 +00:00
web_entry_source.rs refactor AssetContext (vercel/turbo#465) 2022-10-07 13:34:31 +02:00