This is a very basic example of a Remix app, using the Remix App Server and Yarn PnP.
From your terminal
yarn install
yarn dev
This starts your app in development mode, rebuilding assets on file changes.
First, build your app for production:
yarn build
Then run the app in production mode:
yarn start
- You'll need to use Yarn ≥ v3.2.0. Older versions don't work because of an issue with Yarn.
- For editor support of PnP, refer to Editor SDKs.
- When using TypeScript, consider installing the Yarn TypeScript plugin.
- For the
~/*
alias to work for imports relative toapp/*
, you have to add this to yourpackage.json
:You can then also remove the"dependencies": { /* ... */ "~": "link:app/" }
~
alias from yourtsconfig.json
. - For only installing non-dev dependencies in production, you can use
yarn workspaces focus
after removing the.yarn/cache
directory:Or check out plugin-installs by Larry1123.yarn install yarn build rm -r .yarn/cache yarn workspaces focus --production yarn start