mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-03 05:57:47 +08:00
fix(nx/desktop): use proper approach for ejs missing
This commit is contained in:
parent
3ce4aa12d4
commit
e6f9d402cd
@ -69,6 +69,7 @@ export default async function buildApp() {
|
|||||||
|
|
||||||
// view engine setup
|
// view engine setup
|
||||||
app.set("views", path.join(scriptDir, "views"));
|
app.set("views", path.join(scriptDir, "views"));
|
||||||
|
app.engine("ejs", (await import("ejs")).renderFile);
|
||||||
app.set("view engine", "ejs");
|
app.set("view engine", "ejs");
|
||||||
|
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import safeCompare from "safe-compare";
|
import safeCompare from "safe-compare";
|
||||||
import ejs from "ejs";
|
|
||||||
|
|
||||||
import type { Request, Response, Router } from "express";
|
import type { Request, Response, Router } from "express";
|
||||||
|
|
||||||
|
@ -29,8 +29,7 @@ function buildFilesToCopy() {
|
|||||||
"codemirror/addon",
|
"codemirror/addon",
|
||||||
"codemirror/mode",
|
"codemirror/mode",
|
||||||
"codemirror/keymap",
|
"codemirror/keymap",
|
||||||
"@highlightjs/cdn-assets",
|
"@highlightjs/cdn-assets"
|
||||||
"ejs"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const nodePath of nodePaths) {
|
for (const nodePath of nodePaths) {
|
||||||
@ -54,9 +53,6 @@ module.exports = {
|
|||||||
main: './src/main.ts',
|
main: './src/main.ts',
|
||||||
tsConfig: './tsconfig.app.json',
|
tsConfig: './tsconfig.app.json',
|
||||||
assets: ["./src/assets"],
|
assets: ["./src/assets"],
|
||||||
externalDependencies: [
|
|
||||||
"ejs"
|
|
||||||
],
|
|
||||||
optimization: false,
|
optimization: false,
|
||||||
outputHashing: 'none',
|
outputHashing: 'none',
|
||||||
generatePackageJson: true,
|
generatePackageJson: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user