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

fix: 调试apollo

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