miracle/nuxt.config.js

80 lines
1.9 KiB
JavaScript
Raw Normal View History

2019-10-04 20:00:48 +00:00
require('dotenv').config({ path: process.env.THEME ? ".env."+process.env.THEME : ".env"})
console.log("We are running "+process.env.THEME+" theme");
2019-10-04 19:48:41 +00:00
2019-09-27 19:49:30 +00:00
module.exports = {
mode: 'universal',
2019-09-27 19:52:22 +00:00
server: {
2019-09-27 19:56:51 +00:00
host: '0.0.0.0',
2019-10-04 19:48:41 +00:00
port: process.env.PORT || 14033
2019-09-27 19:52:22 +00:00
},
2019-09-27 19:49:30 +00:00
/*
** Headers of the page
*/
head: {
2019-09-27 20:14:00 +00:00
title: 'Damillora - nanao.moe',
2019-09-27 19:49:30 +00:00
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' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Exo+2:300,400,500&display=swap' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=M+PLUS+1p:300,400,500&display=swap' },
],
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
2019-10-04 19:48:41 +00:00
'@/assets/themes/'+(process.env.THEME || "yuriko")+'.css'
2019-09-27 19:49:30 +00:00
],
2019-10-04 19:48:41 +00:00
env: {
subheader: process.env.SUBHEADER || "" ,
header: process.env.HEADER || "Sample Theming",
romaji: process.env.ROMAJI || "This demonstrates themable aspects",
},
2019-09-27 19:49:30 +00:00
/*
** Plugins to load before mounting the App
*/
plugins: [
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
],
/*
** Nuxt.js modules
*/
modules: [
2019-10-04 20:00:48 +00:00
['@nuxtjs/dotenv', { filename: process.env.THEME ? ".env."+process.env.THEME : ".env" }],
2019-09-27 19:49:30 +00:00
],
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
2019-09-28 18:17:52 +00:00
config.module.rules.push({
test: /\.(ogg|mp3|wav|mpe?g)$/i,
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
},
})
2019-09-27 19:49:30 +00:00
}
},
serverMiddleware: [
2019-10-04 20:00:48 +00:00
],
buildDir: '.nuxt.'+(process.env.THEME || "yuriko")
2019-09-27 19:49:30 +00:00
}