forked from TDSoftware/subidentity-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
27 lines (23 loc) · 991 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
require("dotenv").config();
const { defineConfig } = require("@vue/cli-service");
const execSync = require("child_process").execSync;
process.env.VUE_APP_GIT_COMMIT_HASH = execSync("git rev-parse HEAD").toString().trim().substring(0, 7);
process.env.VUE_APP_VERSION = require("./package.json").version;
console.log(`[vue.config] Building app ${process.env.VUE_APP_VERSION} on commit ${process.env.VUE_APP_GIT_COMMIT_HASH}...`);
module.exports = defineConfig({
transpileDependencies: true,
chainWebpack: config => {
config.plugins.delete("named-chunks");
config.module
.rule("vue")
.use("vue-loader")
.loader("vue-loader")
.tap(options => {
options.compilerOptions = {
...(options.compilerOptions || {}),
isCustomElement: tag => /^ion-/.test(tag) || tag === "polkadot-web-identicon"
};
return options;
});
}
});