1 2 3 4 5 6 7 8 9 10 11 | // export function create // export function setInteroptFlag(imports, opts) { // const { noImportInteroptPrefixes = ['sap/'] } = opts // const noImportInteroptPrefixesRegexp = new RegExp(noImportInteroptPrefixes.map(p => `(^${p}.*)`).join('|')) // imports // .filter(imp => imp.default) // .forEach(imp => imp.interop = !noImportInteroptPrefixesRegexp.test(imp.src)) // } "use strict"; |