Skip to content

Nx SvelteKit Plugin

Nx plugin for SvelteKit applications in the Surkyl monorepo.

  • Generate SvelteKit applications with a single command
  • Integrated Nx executors for dev, build, preview, and check
  • Full TypeScript support
  • Vite-powered development and builds
  • Tailwind CSS integration (optional)
  • ESLint configuration

This plugin is installed locally in the monorepo:

Terminal window
pnpm install
Terminal window
pnpm nx g @surkyl/nx-sveltekit:application my-app
  • --name - Application name (required)
  • --directory - Directory where the app should be generated (default: apps)
  • --port - Development server port (default: 5173)
  • --typescript - Use TypeScript (default: true)
  • --routing - Include routing (default: true)

After generating an application, the following targets are available:

  • pnpm nx dev <app-name> - Start development server
  • pnpm nx build <app-name> - Build for production
  • pnpm nx preview <app-name> - Preview production build
  • pnpm nx check <app-name> - Run type checking
  • pnpm nx lint <app-name> - Run ESLint

Build the plugin:

Terminal window
pnpm nx build nx-sveltekit

Test the plugin:

Terminal window
pnpm nx test nx-sveltekit

MIT