fix (backend): pug config loading
This commit is contained in:
parent
2f4c30176d
commit
9dbf6d07c4
2 changed files with 8 additions and 12 deletions
|
@ -88,21 +88,20 @@ serverAdapter.setBasePath(bullBoardPath);
|
|||
app.use(serverAdapter.registerPlugin());
|
||||
//#endregion
|
||||
|
||||
const clientEntry = JSON.parse(
|
||||
readFileSync(
|
||||
`${_dirname}/../../../../../built/_client_dist_/manifest.json`,
|
||||
"utf-8",
|
||||
),
|
||||
)["src/init.ts"];
|
||||
|
||||
// Init renderer
|
||||
app.use(
|
||||
views(`${_dirname}/views`, {
|
||||
extension: "pug",
|
||||
options: {
|
||||
version: config.version,
|
||||
getClientEntry: () =>
|
||||
process.env.NODE_ENV === "production"
|
||||
? config.clientEntry
|
||||
: JSON.parse(
|
||||
readFileSync(
|
||||
`${_dirname}/../../../../../built/_client_dist_/manifest.json`,
|
||||
"utf-8",
|
||||
),
|
||||
)["src/init.ts"],
|
||||
clientEntry,
|
||||
config,
|
||||
},
|
||||
}),
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
block vars
|
||||
|
||||
block loadClientEntry
|
||||
- const clientEntry = getClientEntry();
|
||||
|
||||
doctype html
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue