fix: pulling config from the db during build process
This commit is contained in:
parent
270b7acd4c
commit
1c463ea81e
|
@ -3,7 +3,16 @@ import autoprefixer from 'autoprefixer';
|
|||
|
||||
const Util = require('./src/api/utils/Util');
|
||||
|
||||
export default {
|
||||
export default async () => {
|
||||
/*
|
||||
FIXME:
|
||||
Since Util.config is not populated during production env because it needs to grab the values from the db
|
||||
we need to use this hack to populate it before we can access the properties without await like we do in the export below.
|
||||
This will be solved once the TypeScript rewrite is complete as we can can simply pass a config object to express
|
||||
and build from there, but for now the build needs to be triggered before the API is started.
|
||||
*/
|
||||
await Util.config;
|
||||
return {
|
||||
ssr: true,
|
||||
srcDir: 'src/site/',
|
||||
head: {
|
||||
|
@ -80,3 +89,4 @@ export default {
|
|||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue