Closed bluwy closed 2 days ago
Latest commit: dc95d674af8792773693d491a1f7520d0260e20b
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Changes
fix https://github.com/withastro/astro/issues/11344
Refactor the way
require.resolve
is called. It failed before because theprocess.cwd()
didn't have a trailing slash, so it wasn't resolve from the project directory, but its parent, which doesn't contain thenode_modules
to check packages for.I refactored it to use the
paths
option because it's simpler and we also had a similar code like this.https://github.com/withastro/astro/blob/dc95d674af8792773693d491a1f7520d0260e20b/packages/astro/src/core/routing/manifest/create.ts#L347
Testing
Tested manually by editing the node_modules. I wasn't testing this correctly before because I linked the package, which resolves differently.
Docs
n/a. bug fix.