Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 9c31232

Browse files
pi0clarkdo
authored andcommitted
chore: improve config (#235)
1 parent 7ab985d commit 9c31232

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

template/nuxt/nuxt.config.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
<% if (ui === 'vuetify') { -%>
33
import VuetifyLoaderPlugin from 'vuetify-loader/lib/plugin'
44
<% } -%>
5-
import pkg from './package'
65
<% } else if (server === 'adonis') { -%>
76
const { resolve } = require('path')
8-
const pkg = require('../package')
97
<%} else { -%>
10-
const pkg = require('./package')
118
<% } -%>
129
<% if (!esm) { -%>
1310
<% if (ui === 'vuetify') { %>const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')<% } %>
@@ -27,11 +24,11 @@ module.exports = {
2724
** Headers of the page
2825
*/
2926
head: {
30-
title: pkg.name,
27+
title: process.env.npm_package_name || '',
3128
meta: [
3229
{ charset: 'utf-8' },
3330
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
34-
{ hid: 'description', name: 'description', content: pkg.description }
31+
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
3532
],
3633
link: [
3734
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }<% if (ui === 'vuetify') { %>,
@@ -83,12 +80,13 @@ module.exports = {
8380
// Doc: https://buefy.github.io/#/documentation
8481
'nuxt-buefy',<% } %><% if (pwa === 'yes') { %>
8582
'@nuxtjs/pwa',<% } %>
86-
],<% if (axios === 'yes') { %>
83+
],
84+
<% if (axios === 'yes') { %>
8785
/*
8886
** Axios module configuration
87+
** See https://axios.nuxtjs.org/options
8988
*/
9089
axios: {
91-
// See https://axios.nuxtjs.org/options
9290
},<% } %>
9391

9492
/*

test/snapshots/index.test.js.snap

5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)