Add RemixKit alongside your existing Remix dev experience in minutes by having the CLI install dependencies and add npm scripts to your package.json.
> cd ./your-remix-app
> npx remix-kit@latest installAll Done!
> npm run vite:dev- See the status section for any additional setup steps if using a standard
create-remixtemplate. - A
dev:serverpackage.json npm script is important so that the RemixKit dev server knows how to start your Remix app. - An
--originflag should be passed toremix-kit dev. This specifies the URL of your Remix app that the dev server will proxy requests through to. - You can remove any
purgeRequireCachefunctions as they are no longer necessary.
Install the RemixKit libraries as devDependencies to your existing Remix project. You can use your preferred package manager, below we use pnpm.
pnpm i -D remix-kit @remix-kit/vite @remix-kit/reactWe require these three separate packages since Remix Kit's compiler and rendering library is extensible and you could replace with other options.
Add the RemixKit CLI commands such as below. Use a prefix such as vite: to support both Remix and RemixKit development experiences in parallel.
"scripts": {
"dev": "remix-kit dev --origin http://localhost:3000",
"dev:server": "node ./server.js",
"start": "remix-kit preview",
"build": "remix-kit build"
}- A "dev:server" script is required to tell the dev server how to start the Remix app.
- An
--originflag is required to tell the dev server where your Remix app is hosted.
Congrats! Now just run npm run dev to start both the development server and your Remix app.