UNPKG

@nx/nuxt

Version:

The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Vitest, Playwright, Cypress, and Storybook. - Generators for applications, l

47 lines (46 loc) 1.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createTsConfig = createTsConfig; const devkit_1 = require("@nx/devkit"); const shared = require("@nx/js/src/utils/typescript/create-ts-config"); function createTsConfig(host, options, relativePathToRootTsConfig) { createAppTsConfig(host, options); const json = { files: [], include: options.isUsingTsSolutionConfig ? undefined : ['.nuxt/nuxt.d.ts'], references: [ { path: './tsconfig.app.json', }, ], }; if (options.unitTestRunner !== 'none') { json.references.push({ path: './tsconfig.spec.json', }); } // inline tsconfig.base.json into the project if (options.rootProject) { json.compileOnSave = false; json.compilerOptions = { ...shared.tsConfigBaseOptions, ...json.compilerOptions, }; json.exclude = ['node_modules', 'tmp']; } else { json.extends = './.nuxt/tsconfig.json'; } (0, devkit_1.writeJson)(host, `${options.projectRoot}/tsconfig.json`, json); } function createAppTsConfig(host, options) { const json = { extends: './tsconfig.json', compilerOptions: { composite: true, }, include: ['.nuxt/nuxt.d.ts', 'src/**/*'], exclude: [], }; (0, devkit_1.writeJson)(host, `${options.projectRoot}/tsconfig.app.json`, json); }