-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
93 lines (90 loc) · 2.27 KB
/
vue.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
/* eslint-disable @typescript-eslint/no-require-imports */
/* eslint-disable @typescript-eslint/no-var-requires */
//const { LoaderOptionsPlugin } = require('webpack');
const { resolve } = require("path");
const title = "KB Vue App";
/**
* @type {import('@vue/cli-service').ProjectOptions}
*/
module.exports = {
/*
configureWebpack: {
resolve: {
alias: {
// Alias for using source of Bootstrap-Vue
"bootstrap-vue$": "bootstrap-vue/src/index.js",
},
},
module: {
rules: [
{
test: /\.js$/,
// Exclude transpiling `node_modules`, except `bootstrap-vue/src`
exclude: /node_modules\/(?!bootstrap-vue\/src\/)/,
use: {
loader: "babel-loader",
options: {
presets: ["env"],
},
},
},
],
},
},
*/
configureWebpack: {
resolve: {
alias: {
assets: resolve("src/assets"),
},
},
},
chainWebpack: (config) => {
config.module
.rule("vue")
.use("vue-loader")
.loader("vue-loader")
.tap((options) => {
options.transformAssetUrls = {
img: "src",
image: "xlink:href",
"b-avatar": "src",
"b-img": "src",
"b-img-lazy": ["src", "blank-src"],
"b-card": "img-src",
"b-card-img": "src",
"b-card-img-lazy": ["src", "blank-src"],
"b-carousel-slide": "img-src",
"b-embed": "src",
};
return options;
});
config.plugin("html").tap((args) => {
args[0].title = title;
return args;
});
},
pwa: {
name: title,
iconPaths: {
// favicon16 (16x16), favicon32 (32x32), appleTouchIcon (180x180), msTileImage (144x144), maskIcon (?)
favicon32: "favicon.ico",
// eslint-disable-next-line unicorn/no-null
maskIcon: null,
},
manifestOptions: {
name: title,
short_name: title,
theme_color: "#f20065",
icons: [
// Suggested sizes for all devices, with type image/png (drop the .ico):
// 48x48, 72x72, 96x96, 144x144, 168x168, 192x192, 256x256, 512x512
{
src: "favicon.ico",
sizes: "32x32",
type: "image/vnd.microsoft.icon",
},
],
},
},
};