@netlify/build-info
Version:
Build info utility
34 lines • 1.04 kB
JavaScript
import { BaseFramework, Category } from './framework.js';
export class Nuxt extends BaseFramework {
id = 'nuxt';
name = 'Nuxt';
npmDependencies = ['nuxt', 'nuxt-edge', 'nuxt3'];
category = Category.SSG;
dev = {
command: 'nuxt dev',
port: 3000,
pollingStrategies: [{ name: 'TCP' }],
clearPublishDirectory: true,
};
build = {
command: 'nuxt build',
directory: 'dist',
};
logo = {
default: '/logos/nuxt/default.svg',
light: '/logos/nuxt/light.svg',
dark: '/logos/nuxt/dark.svg',
};
async detect() {
await super.detect();
if (this.detected) {
// Override with legacy config only for major version < 3
if (this.detected.package?.version?.major !== undefined && this.detected.package.version.major < 3) {
this.build.command = 'nuxt generate';
this.dev.command = 'nuxt';
}
return this;
}
}
}
//# sourceMappingURL=nuxt.js.map