Commit 4a6d6e27 authored by 郭志伟's avatar 郭志伟

fix: 路径修复

parent c7ec1828
......@@ -12,7 +12,7 @@ npm.load(() => {
configPath: path.resolve(__dirname, '../config'),
}).then(() => {
const { api, qiniu } = require(path.resolve('./config/apollo.json'));
fs.writeFileSync(path.resolve('./config/apollo.ssr.json'), JSON.stringify({ ...api, ...qiniu }));
fs.writeFileSync(path.resolve(__dirname, './config/apollo.ssr.json'), JSON.stringify({ ...api, ...qiniu }));
if (process.env.NODE_ENV === 'production') {
npm.run("start");
} else {
......
import { Application, EggAppConfig } from 'egg';
const path = require('path');
const { redis, api, qiniu } = require(path.resolve('./config/apollo.json'));
const { redis, api, qiniu } = require(path.resolve(__dirname, './config/apollo.json'));
export default (appInfo: EggAppConfig) => {
const exports: any = {};
......
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