-
Notifications
You must be signed in to change notification settings - Fork 2
/
nuxt.config.js
100 lines (99 loc) · 2.33 KB
/
nuxt.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
export default {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: 'PicoTorrent',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'PicoTorrent is a tiny, hackable BitTorrent client.' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
script: [
{ src: 'https://sa.picotorrent.org/latest.js', async: true, defer: true }
],
noscript: [
{ innerHTML: '<img src="https://sa.picotorrent.org/noscript.gif" alt="">' }
],
__dangerouslyDisableSanitizers: ['noscript']
},
router: {
trailingSlash: false
},
sitemap: {
hostname: 'https://picotorrent.org',
trailingSlash: false
},
/*
** Customize the progress-bar color
*/
loading: { color: '#35b1e1' },
/*
** Global CSS
*/
css: [
'~/static/css/style.scss'
],
/*
** Plugins to load before mounting the App
*/
plugins: [
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
'@nuxtjs/eslint-module'
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/redirect-module',
'@nuxtjs/proxy'
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {
proxy: true
},
proxy: {
'/api/': { target: 'https://api.picotorrent.org', pathRewrite: { '^/api/': '' } }
},
redirect: [
{
// eslint-disable-next-line
from: '(?!^\/$|^\/[?].*$)(.*\/[?](.*)$|.*\/$)',
to: (from, req) => {
const base = req._parsedUrl.pathname.replace(/\/$/, ''); // We take pathname instead of req.url because of the query parameters
const search = req._parsedUrl.search;
return base + (search != null ? search : '');
},
statusCode: 301
}
],
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
config.resolve.symlinks = false;
}
},
publicRuntimeConfig: {
stripePriceId: 'price_1H6xmGKv9Cuy2oQpLUsjM01t',
stripePublishableKey: 'pk_live_51H6vAqKv9Cuy2oQpPJqhfX7xp2hcNyqD20CJZfyLkTThowt3B9qJAl4F7Swqo2ux1JG2lbl7VQs1UrzRzdpozf0J00u2NEghxP'
}
};