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): re-enable inline config in ui5.yaml #866

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions packages/ui5-tooling-transpile/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ module.exports = function (log) {
// return the normalized configuration object
const normalizedConfiguration = {
debug: config.debug,
babelConfigOptions: config.babelConfigOptions,
babelConfig: config.babelConfig,
includes,
excludes,
filePattern,
Expand Down Expand Up @@ -478,18 +478,14 @@ module.exports = function (log) {
// by default Babel uses the regenerator runtime but this
// requires bigger redundant inline code and it is also
// not CSP compliant => therefore the Promise is the better
// solution than using the regenerator runtime (by default)
// solution than using the regenerator runtime
if (configuration?.transformAsyncToPromise) {
babelConfigOptions.plugins.push([
"transform-async-to-promises",
{
inlineHelpers: true
}
]);
} else if (configuration?.targetBrowsers === undefined) {
log.warn(
"Babel uses regenerator runtime to transpile async/await for older target browsers. As this is not CSP compliant consider the usage of transformAsyncToPromise to convert async/await to Promises!"
);
}

// include the source maps
Expand Down