move third party licenses info to json file

This commit is contained in:
MaysWind
2021-01-11 22:12:26 +08:00
parent 54296d9404
commit 081477beaf
5 changed files with 200 additions and 195 deletions
+2
View File
@@ -1,5 +1,6 @@
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const pkgFile = require('./package.json');
const licenseFile = require('./third-patry-licenses.json');
module.exports = {
pages: {
@@ -52,6 +53,7 @@ module.exports = {
definitions[0]['process.env']['VERSION'] = JSON.stringify(pkgFile.version);
definitions[0]['process.env']['COMMIT_HASH'] = JSON.stringify(gitRevisionPlugin.commithash());
definitions[0]['process.env']['BUILD_UNIXTIME'] = JSON.stringify(parseInt((new Date().getTime() / 1000).toString()));
definitions[0]['process.env']['LICENSES'] = JSON.stringify(licenseFile);
return definitions;
});