Commit 9c7a74f0 authored by 郝聪敏's avatar 郝聪敏

test: 测试sentry_env

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