Skip to content

Commit

Permalink
aaa
Browse files Browse the repository at this point in the history
  • Loading branch information
hiwuyi committed May 10, 2023
1 parent 11fb9cb commit 90d1fd7
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
1 change: 1 addition & 0 deletions commit_timestamp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Commit timestamp: 2023-05-10 09:08:16
File renamed without changes.
22 changes: 11 additions & 11 deletions web/buildVue/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const GitRevisionPlugin = require('git-revision-webpack-plugin')
const gitRevision = new GitRevisionPlugin()
// const GitRevisionPlugin = require('git-revision-webpack-plugin')
// const gitRevision = new GitRevisionPlugin()

const env = require('../config/' + process.env.env_config + '.env')

Expand Down Expand Up @@ -87,13 +87,13 @@ const webpackConfig = merge(baseWebpackConfig, {
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
gitRevision,
// gitRevision,
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env,
'process.env.VERSION': JSON.stringify(gitRevision.version()),
'process.env.COMMITHASH': JSON.stringify(gitRevision.commithash()),
'process.env.BRANCH': JSON.stringify(gitRevision.branch())
'process.env': env
// 'process.env.VERSION': JSON.stringify(gitRevision.version()),
// 'process.env.COMMITHASH': JSON.stringify(gitRevision.commithash()),
// 'process.env.BRANCH': JSON.stringify(gitRevision.branch())
}),
// new UglifyJsPlugin({
// uglifyOptions: {
Expand Down Expand Up @@ -122,14 +122,14 @@ const webpackConfig = merge(baseWebpackConfig, {
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? {
cssProcessorOptions: config.build.productionSourceMap ?
{
safe: true,
map: {
inline: false
}
}
: {
} :
{
safe: true
}
}),
Expand Down
16 changes: 8 additions & 8 deletions web/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
// see http://vuejs-templates.github.io/webpack for documentation.

const path = require('path')
const GitRevisionPlugin = require('git-revision-webpack-plugin')
// const GitRevisionPlugin = require('git-revision-webpack-plugin')

module.exports = {
'chainWebpack': config => {
config.plugin('define').tap(args => {
const gitRevisionPlugin = new GitRevisionPlugin()
args[0]['process.env']['COMMIT_HASH'] = JSON.stringify(gitRevisionPlugin.commithash())
return args
})
},
// 'chainWebpack': config => {
// config.plugin('define').tap(args => {
// const gitRevisionPlugin = new GitRevisionPlugin()
// args[0]['process.env']['COMMIT_HASH'] = JSON.stringify(gitRevisionPlugin.commithash())
// return args
// })
// },
dev: {

// Paths
Expand Down
1 change: 0 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"eslint-plugin-vue": "^4.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"git-revision-webpack-plugin": "^2.5.1",
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.4.0",
"node-notifier": "^5.1.2",
Expand Down
4 changes: 2 additions & 2 deletions web/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Vue.prototype.baseAPIURL = netData === 80001 ? process.env.BASE_PAYMENT_GATEWAY_
Vue.prototype.baseAddressURL = netData === 80001 ? process.env.BASE_MUMBAI_ADDRESS : process.env.BASE_POLYGON_ADDRESS
Vue.prototype.Web3 = Web3
Vue.prototype.baseNetwork = process.env.BASE_ENV === true
console.log('update time: 2023-4-28', 'env:', process.env.BASE_ENV === true ? 'Main' : 'Cali', process.env.BASE_ENV)
console.log('update time: 2023-5-9', 'env:', process.env.BASE_ENV === true ? 'Main' : 'Cali', process.env.BASE_ENV)
router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.requiresAuth)) {
if (!sessionStorage.getItem('metaAddress')) {
Expand Down Expand Up @@ -82,7 +82,7 @@ new Vue({
router,
store,
i18n,
metaInfo () {
metaInfo() {
return {
title: this.$store.getters.metaInfo.title,
meta: [{
Expand Down

0 comments on commit 90d1fd7

Please sign in to comment.