Commit d943ddbe authored by 郭志伟's avatar 郭志伟

fix: 调试apollo

parent 0a0a1bfe
......@@ -8,10 +8,8 @@
// shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`,
// qiniuUpHost: `${protocol}//up-z0.qiniup.com`,
// };
import apollo from '../../../config/apollo.json';
const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https';
export default {
...apollo.api,
...apollo.qiniu,
...(EASY_ENV_IS_BROWSER ? window.apollo : {}),
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`,
};
......@@ -9,7 +9,6 @@ npm.load(() => {
appId: 'quantum-blocks',
configPath: path.resolve(__dirname, '../config'),
}).then(() => {
npm.run("build");
if (process.env.NODE_ENV === 'production') {
npm.run("start");
} else {
......
......@@ -3,6 +3,11 @@ const path = require('path');
const SentryPlugin = require("webpack-sentry-plugin");
const resolve = filepath => path.resolve(__dirname, filepath);
const SentryConfig = require("./app/web/.sentryclirc.ts");
const apolloSource = require('./config/apollo.json');
let apollo = {};
if (process.env.NODE_ENV !== 'development') {
apollo = { ...apolloSource.api, ...apolloSource.qiniu };
}
let { name } = require('./package');
name = name.replace(/-/g, '');
......@@ -73,7 +78,8 @@ module.exports = {
define:{
'process.env': {
SENTRY_ENV: JSON.stringify(process.env.SENTRY_ENV)
}
},
'window.apollo': JSON.stringify(apollo)
}
}
],
......
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 to comment