fix
This commit is contained in:
parent
193de40410
commit
12741b3d89
|
@ -69,14 +69,16 @@ serverAdapter.setBasePath(bullBoardPath);
|
||||||
app.use(serverAdapter.registerPlugin());
|
app.use(serverAdapter.registerPlugin());
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
|
const clientEntry = process.env.NODE_ENV === 'production' ?
|
||||||
|
config.clientEntry :
|
||||||
|
JSON.parse(readFileSync(`${_dirname}/../../../../../built/_client_dist_/manifest.json`, 'utf-8'))['src/init.ts'].file.replace(/^_client_dist_\//, '')
|
||||||
|
|
||||||
// Init renderer
|
// Init renderer
|
||||||
app.use(views(_dirname + '/views', {
|
app.use(views(_dirname + '/views', {
|
||||||
extension: 'pug',
|
extension: 'pug',
|
||||||
options: {
|
options: {
|
||||||
version: config.version,
|
version: config.version,
|
||||||
clientEntry: () => process.env.NODE_ENV === 'production' ?
|
clientEntry,
|
||||||
config.clientEntry :
|
|
||||||
JSON.parse(readFileSync(`${_dirname}/../../../../../built/_client_dist_/manifest.json`, 'utf-8'))['src/init.ts'].file.replace(/^_client_dist_\//, ''),
|
|
||||||
config,
|
config,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -52,7 +52,7 @@ html
|
||||||
|
|
||||||
script.
|
script.
|
||||||
var VERSION = "#{version}";
|
var VERSION = "#{version}";
|
||||||
var CLIENT_ENTRY = "#{clientEntry()}";
|
var CLIENT_ENTRY = "#{clientEntry}";
|
||||||
|
|
||||||
script
|
script
|
||||||
include ../boot.js
|
include ../boot.js
|
||||||
|
|
Loading…
Reference in New Issue