Skip to content

Custom template in css extension is searched among CSS config dir instead of my extension config dir #1901

Answered by joachimvh
Chiyo-no-sake asked this question in Q&A
Discussion options

You must be logged in to vote

Your HTML templates not being found is a consequence of how Node.js handles file paths. If you have a relative file path, such as config/templates/onedrive-login.html.ejs, it is interpreted starting from the location the Node.js process was executed, which is why you always want to work with absolute paths. With CSS we worked around that by creating a prefix @css: which the server interprets as the root path of the project:

if (path.startsWith(modulePathPlaceholder)) {
return resolveModulePath(path.slice(modulePathPlaceholder.length));
}

Since you can't use that prefix you should probably cha…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@elf-pavlik
Comment options

@joachimvh
Comment options

Answer selected by Chiyo-no-sake
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants