forked from Endebert/squadmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
34 lines (28 loc) · 941 Bytes
/
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
/* eslint-disable no-param-reassign */
// patching fs, otherwise project can't be built on windows machines
const realFs = require("fs");
const gracefulFs = require("graceful-fs");
gracefulFs.gracefulify(realFs);
module.exports = {
chainWebpack: () => {
if (process.env.NODE_ENV === "production") {
// console.log("PLUGINS: ", config.plugins);
// config.plugins.delete("prefetch");
}
},
configureWebpack: (config) => {
// this is probably not the right way to do it, but it works.
// FIXME: do this properly
if (process.env.NODE_ENV === "production") {
config.optimization.splitChunks.cacheGroups.vuetify = {
test: /[\\/]vuetify[\\/]/,
};
// remove console prints
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true;
}
config.module.rules.push({
test: /\.md$/,
loader: "vue-loader!vue-md-loader",
});
},
};