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 asset serving when using a basename #442

Merged
merged 3 commits into from
Oct 21, 2024
Merged

fix asset serving when using a basename #442

merged 3 commits into from
Oct 21, 2024

Conversation

iamtomcat
Copy link
Contributor

@iamtomcat iamtomcat commented Oct 19, 2024

Hey when I use the basename in remix vite plugin and set base in vite locally assets are served at the same basename. But when using your plugin assets are still served at the root in production mode. So just made the change to respect the basename path.

If you want something that is more flexible let me know.

export default defineConfig({
  base: "/platform/",
  plugins: [
    remix({
      basename: "/platform/",
    }),
  ],
})

Copy link

changeset-bot bot commented Oct 19, 2024

🦋 Changeset detected

Latest commit: 56604d5

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

This PR includes changesets to release 1 package
Name Type
@mcansh/remix-fastify 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
Owner

@mcansh mcansh left a comment

Choose a reason for hiding this comment

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

thank you so much!

@mcansh
Copy link
Owner

mcansh commented Oct 21, 2024

hey @iamtomcat i still need to look at this locally, but if you rebase the changes from main, it should kick off a preview version of the package for you (and i, and any one else) to test out

@iamtomcat
Copy link
Contributor Author

Cool will do in a bit here!

Copy link

pkg-pr-new bot commented Oct 21, 2024

Open in Stackblitz

More templates

pnpm add https://pkg.pr.new/@mcansh/remix-fastify@442

commit: 56604d5

Signed-off-by: Logan McAnsh <logan@mcan.sh>
@mcansh mcansh changed the title Changing static / to basename fix asset serving when using a basename Oct 21, 2024
@mcansh
Copy link
Owner

mcansh commented Oct 21, 2024

looks to be working great, thanks again (ex: https://github.com/mcansh/remix-fastify-442)

(i really need to add some integration tests here 😅)

@mcansh mcansh merged commit 88e2ad1 into mcansh:main Oct 21, 2024
7 checks passed
@iamtomcat
Copy link
Contributor Author

iamtomcat commented Oct 22, 2024

No worries! The published package link was very useful btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants