UNPKG

@ant-design/tools

Version:
15 lines (14 loc) 397 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function rewriteSource(t, path, libDir) { if (libDir === 'dist') { const matches = path.node.source.value.match(new RegExp('^antd(-mobile)?$')); if (matches) { path.node.source.value = `../../../dist/${matches[0]}`; } } } var _default = exports.default = rewriteSource;