in packages/build-plugin-lce/src/common/babelPluginCorejsLock.js [8:20]
ImportDeclaration(nodePath, state) {
const entryFile = fileList.find((filePath) => {
// filePath may not have an extension
return filePath.includes((state.filename || '').replace(/\.[^/.]+$/, ''));
});
if (entryFile) {
const { node } = nodePath;
// only replace core-js/modules/xxx added by @babel/preset-env
if (node.source.value.startsWith('core-js/modules')) {
node.source.value = node.source.value.replace('core-js/', `${coreJSPath}/`);
}
}
},