Commit 9a28c9a5 by hank

bugfix

parent 0547cc53
...@@ -9,7 +9,6 @@ const chalk = require('chalk') ...@@ -9,7 +9,6 @@ const chalk = require('chalk')
const webpack = require('webpack') const webpack = require('webpack')
const config = require('../config') const config = require('../config')
const webpackConfig = require('./webpack.prod.conf') const webpackConfig = require('./webpack.prod.conf')
console.log(process.env.BUILD_ENV)
const spinner = ora('building for production...') const spinner = ora('building for production...')
spinner.start() spinner.start()
......
...@@ -11,7 +11,12 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin') ...@@ -11,7 +11,12 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin') const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env') let env = require('../config/prod.env')
console.log(process.env.BUILD_ENV)
if(process.env.BUILD_ENV) {
env.BUILD_ENV = JSON.stringify(process.env.BUILD_ENV)
}
console.log(env, 'env') console.log(env, 'env')
const webpackConfig = merge(baseWebpackConfig, { const webpackConfig = merge(baseWebpackConfig, {
module: { module: {
......
...@@ -21,7 +21,7 @@ const weburl = 'https://wanda-h5.bdideal.com' ...@@ -21,7 +21,7 @@ const weburl = 'https://wanda-h5.bdideal.com'
// var url = mode === 'development' ? 'http://web-comment.canskj.cn' : 'http://wanda-qj.iyunfish.com' // var url = mode === 'development' ? 'http://web-comment.canskj.cn' : 'http://wanda-qj.iyunfish.com'
// 测试地址 // 测试地址
var url = mode === 'development' ? 'https://wanda-video-tapi.bdideal.com' : BUILD_ENV==='dev' ? 'https://wanda-video-tapi.bdideal.com' : 'https://wanda-video-api.bdideal.com' var url = mode === 'development' ? 'https://wanda-video-tapi.bdideal.com' : BUILD_ENV==='dev' ? 'https://wanda-video-tapi.bdideal.com' : 'https://wanda-video-api.bdideal.com'
console.log('mode', mode, url) console.log('mode', mode, url, BUILD_ENV,BUILD_ENV==='dev' )
// api地址 // api地址
var h5Url = mode === 'development' ? '/video-test' : BUILD_ENV==='dev' ? '/video-test' : '/video' var h5Url = mode === 'development' ? '/video-test' : BUILD_ENV==='dev' ? '/video-test' : '/video'
var server = url; var server = url;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment