-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
70 lines (70 loc) · 2.04 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
if (process.env.NODE_ENV !== "production") {
require("dotenv").config();
}
const colors = require("vuetify/lib/util/colors").default;
module.exports = {
mode: "spa",
env: {
BASE_URL: process.env.BASE_URL,
API_HOST: process.env.API_HOST,
AUTHORIZATION_TOKEN: process.env.AUTHORIZATION_TOKEN,
PEER_SERVER_HOST: process.env.PEER_SERVER_HOST || "0.peerjs.com",
PEER_SERVER_PORT: process.env.PEER_SERVER_PORT ? JSON.parse(process.env.PEER_SERVER_PORT) : 443,
PEER_SERVER_KEY: process.env.PEER_SERVER_KEY || "peerjs",
},
loading: { color: colors.blue.base },
build: {
extend(config, { isDev, isClient }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: "pre",
test: /\.(js|vue)$/,
loader: "eslint-loader",
exclude: /(node_modules)/,
options: { formatter: require("eslint-friendly-formatter") },
});
}
config.node = {
net: "empty",
tls: "empty",
dns: "empty",
};
config.performance.maxAssetSize = 350000;
config.module.rules.push({
test: /\.svgi$/,
use: ["html-loader"],
});
},
loaders: { vue: { transformAssetUrls: { "svg-img": "src" } } },
babel: { plugins: ["@babel/plugin-proposal-export-default-from"] },
postcss: require("./config/build/postcss"),
transpile: [],
publicPath: "/nuxt/",
},
watch: ["@/config/**/*.js"],
buildModules: ["@nuxtjs/vuetify"],
modules: [
"@nuxtjs/style-resources",
[
"@nuxtjs/dotenv",
require("./config/dotenv"),
],
"@nuxtjs/axios",
],
plugins: [
"@/plugins/axios",
"@/plugins/svg-img",
"@/plugins/joi",
"@/plugins/geolocation.client",
"@/plugins/vuetify-toast.client",
],
css: [
"@/assets/styles/bases/index.scss",
"@/assets/styles/vendors/index.scss",
],
head: require("./config/head"),
styleResources: require("./config/style-resources"),
router: require("./config/router"),
vuetify: require("./config/vuetify"),
axios: require("./config/axios"),
};