-
Notifications
You must be signed in to change notification settings - Fork 313
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
Adds Vite to the Indie Stack #284
Open
shmuli9
wants to merge
14
commits into
remix-run:main
Choose a base branch
from
shmuli9:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
eead404
add vite
shmuli9 22b4af9
removed unecessary livereload
shmuli9 25d140d
update dockerfile for vite
shmuli9 6395af6
remove dep on cypress for deploys
shmuli9 1a4a0c3
Merge branch 'main' of https://github.com/remix-run/indie-stack
9d80336
bump remix vite api usage
4e2ecb1
updated seed command for node 20
915bc70
use vite-node for better esm support
03583a2
replaced ts-node with vite-node to simplify running esm scripts
b5b8cab
make mocks esm compatible
shmuli9 9536621
reordered deps
shmuli9 388dec7
added back deploy dep on cypress
shmuli9 db5daf4
Merge branch 'main2' of github.com:shmuli9/indie-stack into main2
shmuli9 aab7a15
Merge pull request #2 from shmuli9/main2
shmuli9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Use this to create a new user and login with that user | ||
// Simply call this with: | ||
// npx ts-node -r tsconfig-paths/register ./cypress/support/create-user.ts [email protected], | ||
// npx vite-node ./cypress/support/create-user.ts [email protected], | ||
// and it will log out the cookie value you can use to interact with the server | ||
// as that new user. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Use this to delete a user by their email | ||
// Simply call this with: | ||
// npx ts-node -r tsconfig-paths/register ./cypress/support/delete-user.ts [email protected], | ||
// npx vite-node ./cypress/support/delete-user.ts [email protected], | ||
// and that user will get deleted | ||
|
||
import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/// <reference types="@remix-run/dev" /> | ||
/// <reference types="vite/client" /> | ||
/// <reference types="@remix-run/node" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = { | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/// <reference types="vitest" /> | ||
/// <reference types="vite/client" /> | ||
import { vitePlugin as remix } from "@remix-run/dev"; | ||
import { installGlobals } from "@remix-run/node"; | ||
import { defineConfig } from "vite"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
|
||
installGlobals(); | ||
|
||
export default defineConfig({ | ||
server: { | ||
port: 3000, | ||
}, | ||
plugins: [ | ||
remix({ | ||
ignoredRouteFiles: ["**/.*", "**/*.test.{ts,tsx}"], | ||
}), | ||
tsconfigPaths(), | ||
], | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 work @shmuli9. Just curious why we change .js to .cjs? We did say "type": "module" in package.json I would have thought js will be treated as mjs? Did I miss anything? 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.
@enRose I can't actually remember the exact reason why this was necessary. Pretty sure it was because eslint doesn't support esm.
If you've applied these changes do you want to check that it works ok as .js?
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.
@shmuli9 I think you are right. Ran it as .js says require() not supported. I wonder if v9 of eslint would actually work with .js.
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, pretty sure eslint v9 supports esm natively.
You can see here that for v8.57,
.cjs
is required