UNPKG

@edbzn/nuxt

Version:

<img src="https://github.com/edbzn/nx-nuxt/blob/master/logo.png" alt="@edbzn/nuxt logo" width="500" />

49 lines 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.updateNuxtConfig = void 0; function updateNuxtConfig(options) { return (host) => { const configPath = `${options.appProjectRoot}/nuxt.config.js`; const content = ` export default { target: '${options.target}', ssr: ${options.mode === 'universal'}, head: { title: '${options.name}' || '', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'description', name: 'description', content: process.env.npm_package_description || '' } ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } ] }, css: [], plugins: [], components: true, buildModules: [ '@nuxt/typescript-build', ], modules: [], build: { babel: { presets({ isServer }) { return [ [ require.resolve('@nuxt/babel-preset-app'), { buildTarget: isServer ? 'server' : 'client', corejs: { version: 3 }, }, ], ]; }, }, } };`; host.overwrite(configPath, content); }; } exports.updateNuxtConfig = updateNuxtConfig; //# sourceMappingURL=update-nuxt-config.js.map