Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use absolute path for included files #313

Merged
merged 1 commit into from
Jul 1, 2024
Merged

fix: use absolute path for included files #313

merged 1 commit into from
Jul 1, 2024

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Jul 1, 2024

Changes

The adapter adds an included_files option to the SSR function manifest to ensure that all traced files are included in the bundle. The path is currently relative to the root of the site, which breaks when in a monorepo. This PR changes the path to be absolute, which works everywhere. Using an absolute path is fine because bundling always happens on the same machine as the build.

Fixes #309

Testing

Test deploy: https://66826aaccd6edbca0c286764--fascinating-belekoy-dfd085.netlify.app/

Docs

Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: b410221

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@astrojs/netlify Patch
@test/netlify-hosted-astro-project Patch

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

Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, maybe we can release a preview for the affected user to confirm?

Copy link
Contributor

github-actions bot commented Jul 1, 2024

Snapshots have been released for the following packages:

  • @astrojs/netlify@experimental--absolute-includes
Publish Log
🦋  warn ===============================IMPORTANT!===============================
🦋  warn Packages will be released under the experimental--absolute-includes tag
🦋  warn ----------------------------------------------------------------------
🦋  info npm info @astrojs/cloudflare
🦋  info npm info @astrojs/netlify
🦋  warn @astrojs/cloudflare is not being published because version 11.0.1 is already published on npm
🦋  info @astrojs/netlify is being published because our local version (0.0.0-absolute-includes-20240701095820) has not been published on npm
🦋  info Publishing "@astrojs/netlify" at "0.0.0-absolute-includes-20240701095820"
🦋  success packages published successfully:
🦋  @astrojs/netlify@0.0.0-absolute-includes-20240701095820
🦋  Creating git tag...
🦋  New tag:  @astrojs/netlify@0.0.0-absolute-includes-20240701095820
Build Log

> root@0.0.0 build /home/runner/work/adapters/adapters
> turbo run build --filter="@astrojs/*"

• Packages in scope: @astrojs/cloudflare, @astrojs/netlify, @astrojs/test-utils
• Running build in 3 packages
• Remote caching disabled
::group::@astrojs/netlify:build
cache miss, executing 54fb8c424a734312

> @astrojs/netlify@0.0.0-absolute-includes-20240701095820 build /home/runner/work/adapters/adapters/packages/netlify
> tsc

::endgroup::
::group::@astrojs/cloudflare:build
cache miss, executing 984452774e18a17a

> @astrojs/cloudflare@11.0.1 build /home/runner/work/adapters/adapters/packages/cloudflare
> tsc

::endgroup::

 Tasks:    2 successful, 2 total
Cached:    0 cached, 2 total
  Time:    3.886s 

@ascorbic ascorbic merged commit 55a3e1a into main Jul 1, 2024
8 checks passed
@github-actions github-actions bot mentioned this pull request Jul 1, 2024
@mashehu
Copy link

mashehu commented Jul 1, 2024

Can confirm that it works now in my monorepo setup! Thanks for the quick fix.

@ascorbic ascorbic deleted the plt-2261 branch July 1, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

netlify adapter breaks with npm workspaces/monorepo
4 participants