Commit 1d092b3d authored by 郝聪敏's avatar 郝聪敏

test: 测试环境变量问题

parent b551fa0c
...@@ -2,4 +2,4 @@ import prod from './prod.config'; ...@@ -2,4 +2,4 @@ import prod from './prod.config';
import dev from './dev.config'; import dev from './dev.config';
import test from './test.config'; import test from './test.config';
export default process.env.SENTRY_ENV ? test : process.env.NODE_ENV === 'production' ? prod : dev; export default process.env.NODE_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev;
...@@ -31,7 +31,7 @@ export default (appInfo: EggAppConfig) => { ...@@ -31,7 +31,7 @@ export default (appInfo: EggAppConfig) => {
database: 'low_code', database: 'low_code',
}; };
exports.sequelize = process.env.SENTRY_ENV ? localMysqlConfig : prodMysqlConfig; exports.sequelize = process.env.NODE_ENV === 'test' ? localMysqlConfig : prodMysqlConfig;
return exports; return exports;
}; };
...@@ -67,13 +67,6 @@ module.exports = { ...@@ -67,13 +67,6 @@ module.exports = {
args: SentryConfig args: SentryConfig
} }
}, },
{
define:{
'process.env': {
SENTRY_ENV: JSON.stringify(process.env.SENTRY_ENV)
}
}
}
], ],
optimization: { optimization: {
namedModules: true, namedModules: true,
......
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