Skip to content

cli v1.0.2

Choose a tag to compare

@github-actions github-actions released this 04 Nov 21:29
· 7 commits to main since this release
4eb3c5e

Patch Changes

  • New apps now fingerprint assets in production and close the asset server on shutdown. With NODE_ENV=production, asset URLs include a content hash and are served with Cache-Control: public, max-age=31536000, immutable instead of no-cache. The SIGINT and SIGTERM handlers in server.ts also await assets.close() before exiting. (#12086)

    Existing generated apps can apply the same setup:

     // app/assets.ts
     const isDevelopment = nodeEnv === 'development'
    +const isProduction = nodeEnv === 'production'
    
     export const assets = createAssetServer({
       minify: !isDevelopment,
    +  fingerprint: isProduction,
       watch: isDevelopment,
     })
     // server.ts
    +import { assets } from './app/assets.ts'
     import { router } from './app/router.ts'
    
     function shutdown() {
    -  server.close(() => process.exit(0))
    +  server.close(() => assets.close().finally(() => process.exit(0)))
     }
  • New apps created with remix new on Windows now run dev, hmr, start, and test through cross-env-shell, avoiding the 'NODE_ENV' is not recognized error in Windows command shells while preserving Ctrl+C shutdown handling. The generated app includes cross-env as a production dependency so start also works when development dependencies are omitted. Apps created on macOS and Linux keep their existing scripts and dependencies (#11996). (#12096)

  • Bumped @remix-run/* dependencies: