Resolve a path relative to the root of a package directory.
Additional path arguments are resolved relative to the package dir.
The first argument can be a package name or a file URL string such as
import.meta.url. For a file URL, the package root is the nearest ancestor
directory containing a package.json file, starting from the module's
directory. This lets a package resolve its own assets without using its name.
This is particularly useful when you want to access assets shipped with
your backend plugin package. When doing so, do not forget to include the assets
in your published package by adding them to files in your package.json.
Resolve a path relative to the root of a package directory. Additional path arguments are resolved relative to the package dir.
The first argument can be a package name or a file URL string such as
import.meta.url. For a file URL, the package root is the nearest ancestor directory containing apackage.jsonfile, starting from the module's directory. This lets a package resolve its own assets without using its name.This is particularly useful when you want to access assets shipped with your backend plugin package. When doing so, do not forget to include the assets in your published package by adding them to
filesin yourpackage.json.