Skip to content

[FEATURE REQUEST] Support typescript path mapping #137

@slin-sap

Description

@slin-sap

In tsconfig.json, it is possible to add a path mapping configuration like this.

{
    "compilerOptions": {
        "paths": {
	    "@/*": ["*"]
        }, 
        .......
    }
}

It help to avoid writing deep relative import path. E.g. import { getMyUtility } from "@/utils"; instead of import { getMyUtility } from "../../../../utils";

But this feature is not supported by babel-plugin-transform-modules-ui5 at runtime when running ui5 serve on dev mode. The transpiled UI5 code resource treats such imports as an url path that contains '@/utils' and thus failed to load the resource.

It would be great to support path mapping for both dev mode and production bundling.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions