-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat(remix): Add Vite support. #495
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thank you Onur!
Just have a couple of small comments.
Also one question: I saw that the "remix reveal" command adds some stuff to the server entry file around handling bot vs human requests. Is this what's present if there was no entry file at all (aka the sensible defaults they talk about) or is this something in addition? I just want to make sure that people do not confuse this with Sentry-relevant code.
src/remix/sdk-setup.ts
Outdated
export async function modifyViteConfig( | ||
selectedProject: { | ||
organization: { slug: string }; | ||
slug: string; | ||
}, | ||
sentryUrl: string, | ||
authToken: string, | ||
selfHosted: boolean, | ||
): Promise<void> { | ||
await configureVitePlugin({ | ||
orgSlug: selectedProject.organization.slug, | ||
projectSlug: selectedProject.slug, | ||
url: sentryUrl, | ||
selfHosted, | ||
authToken, | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l: Can we just directly call configureVitePlugin
? Maybe I missed something but looks like we only call this once. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, makes sense 👍 updated -> 177ab2b
src/remix/sdk-setup.ts
Outdated
childProcess.execSync(REMIX_REVEAL_COMMAND, { | ||
stdio: 'inherit', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 👍 -> a184b9f
src/remix/sdk-setup.ts
Outdated
childProcess.execSync(REMIX_REVEAL_COMMAND, { | ||
stdio: 'inherit', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how remix reveal
works but should we check for the return value or try/catch it? Just to ensure we don't crash but e.g. link to the manual setup if something goes wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is handled on the remix-wizard.ts
. This will throw on any non-zero exit code, which will be caught on the upper level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh right, I missed this, thanks!
As far as I know, those are also a part of their sensible defaults. I have seen them on default Remix application templates too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, LGTM now, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, please add an entry to CHANGELOG.md
under the ## Unreleased
section.
Resolves: #487
Adds Vite sourcemaps upload support to Remix wizard.
Also:
npx run reveal
whenentry.client
/entry.server
files do not exist in the project.project.name
instead ofproject.slug
) while populating build upload script with theproject
argument.