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(ui5-tooling-transpile): allow to forward config options for presets #768

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

petermuessig
Copy link
Member

@petermuessig petermuessig commented Jul 17, 2023

If no .bablerc file is in the project, the ui5-tooling-transpile extension generates a default configuration using @babel/preset-env, transform-ui5, and @babel/preset-typescript. These presets can't be configured easily and a custom .babelrc was necessary to add configuration options.

The change extends the configuration options transformTypeScript and transformModulesToUI5 to also accept an object which includes the configuration options to be delegated to the presets configuration. With this approach, developers can avoid creating a custom .babelrc and just pass the configuration options inline in the ui5.yaml.

Example usage:

specVersion: "3.0"
metadata:
  name: ui5.ecosystem.demo.tsapp
type: application
  customTasks:
    - name: ui5-tooling-transpile-task
      afterTask: replaceVersion
      configuration:
        debug: true
        transformModulesToUI5:
          overridesToOverride: true

@petermuessig petermuessig requested a review from akudev July 17, 2023 14:53
@petermuessig petermuessig merged commit 1e61090 into main Jul 17, 2023
5 checks passed
@petermuessig petermuessig deleted the pm4 branch July 17, 2023 19:57
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.

2 participants