wexts-netlify-plugin
v1.0.0
Published
Netlify Build Plugin for WEXTS framework projects
Maintainers
Readme
@wexts/netlify-plugin
Official Netlify Build Plugin for WEXTS framework projects.
Installation
Automatic (Recommended)
The plugin will be automatically installed when Netlify detects a WEXTS project.
Manual Installation
Add to your netlify.toml:
[[plugins]]
package = "@wexts/netlify-plugin"Or install via npm:
pnpm add -D @wexts/netlify-pluginConfiguration
Basic Setup
Create a netlify.toml in your project root:
[build]
command = "pnpm run build"
publish = "apps/web/.next"
[[plugins]]
package = "@wexts/netlify-plugin"Advanced Configuration
Override default settings:
[[plugins]]
package = "@wexts/netlify-plugin"
[plugins.inputs]
frontendDir = "apps/web"
backendDir = "apps/api"
buildCommand = "turbo run build"
publishDir = "apps/web/.next"Features
- ✅ Automatic WEXTS project detection
- ✅ Monorepo support (Turborepo, pnpm workspace)
- ✅ Next.js frontend optimization
- ✅ NestJS serverless functions support
- ✅ Build caching for faster deployments
- ✅ Helpful error messages
How It Works
- onPreBuild: Detects WEXTS project and restores cache
- onBuild: Builds frontend and backend
- onPostBuild: Saves cache for next deployment
- onSuccess: Shows deployment summary
- onError: Provides debugging information
WEXTS Configuration
If you have a wexts.config.ts, the plugin will automatically use it:
import { WextsConfig } from '@wexts/config';
const config: WextsConfig = {
framework: 'wexts',
version: '2.0.0',
apps: {
frontend: {
dir: 'apps/web',
framework: 'nextjs'
},
backend: {
dir: 'apps/api',
framework: 'nestjs'
}
},
monorepo: {
tool: 'turborepo'
}
};
export default config;Environment Variables
Set these in your Netlify dashboard if needed:
NODE_VERSION: Node.js version (default: 18)PNPM_VERSION: pnpm version (default: latest)
Deploying
Via Git
- Connect your repository to Netlify
- Netlify will auto-detect the plugin
- Deploy!
Via CLI
netlify deployTroubleshooting
Build fails with "Module not found"
Make sure all dependencies are in package.json's dependencies, not devDependencies.
Frontend not deploying
Check that publishDir points to the correct build output (usually .next for Next.js).
Backend functions not working
Ensure your NestJS routes are compatible with Netlify Functions format.
License
MIT
