Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add support for import.meta.url|resolve #106

Merged
merged 1 commit into from
Jun 13, 2023
Merged

Conversation

petermuessig
Copy link
Member

@petermuessig petermuessig commented Jun 12, 2023

With this change we add support for import.meta.url and import.meta.resolve() for the transpilation step of the plugin.

This is how import.meta.url is handled:

// ES syntax:
import.meta.url;

// UI5 AMD-like syntax:
sap.ui.define(["module"], function(module) {

  module.url;

});

This is how import.meta.resolve(...) is handled:

// ES syntax:
import.meta.resolve(...);

// UI5 AMD-like syntax:
sap.ui.define(["require"], function(require) {

  require.toUrl(...);

});

Fixes #103

@petermuessig petermuessig merged commit afb1e6d into main Jun 13, 2023
6 checks passed
@petermuessig petermuessig deleted the fix/importMeta branch June 13, 2023 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] support import.meta.url and import.meta.resolve(...)
2 participants