remove harcoded module

Signed-off-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>
This commit is contained in:
Juan Pablo Garcia Ripa
2024-04-10 23:09:21 +02:00
parent 2ab814f124
commit c56cfd8990
2 changed files with 11 additions and 4 deletions
@@ -204,7 +204,7 @@ module.exports = {
if (specifier.emitProp && !specifier.emitComponent) {
const replacement = `import { ${getNamedImportValue(
specifier,
)} } from '@material-ui/core/${specifier.componentValue}';`;
)} } from '${node.source.value}/${specifier.componentValue}';`;
replacements.push(replacement);
}
@@ -213,9 +213,9 @@ module.exports = {
replacements.push(
`import ${
specifier.componentAlias ?? specifier.componentValue
}, { ${getNamedImportValue(
specifier,
)} } from '@material-ui/core/${specifier.componentValue}';`,
}, { ${getNamedImportValue(specifier)} } from '${
node.source.value
}/${specifier.componentValue}';`,
);
}
}