mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
node: remove workaround for font imports with relative paths
Commit a76c3ec789
fixes the underlying issue.
This commit is contained in:
parent
46b7839db2
commit
2fc418251b
1 changed files with 2 additions and 5 deletions
|
@ -294,12 +294,9 @@ export class CompileError extends Error {
|
|||
/**
|
||||
* Loads the given slint file and returns a constructor to create an instance of the exported component.
|
||||
*/
|
||||
export function loadFile(filePath: string) : Object {
|
||||
// this is a workaround that fixes an issue there resources in slint files cannot be loaded if the
|
||||
// file path is given as relative path
|
||||
let absoluteFilePath = path.resolve(filePath);
|
||||
export function loadFile(filePath: string): Object {
|
||||
let compiler = new napi.ComponentCompiler;
|
||||
let definition = compiler.buildFromPath(absoluteFilePath);
|
||||
let definition = compiler.buildFromPath(filePath);
|
||||
|
||||
let diagnostics = compiler.diagnostics;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue