* Replaces 'dist/' or './dist/' prefix from a file path with './' * Only matches at the start of the path to avoid false matches * @param {string} filePath - The file path to process * @returns {string} The path without dist prefix
(filePath)
| 45 | * @returns {string} The path without dist prefix |
| 46 | */ |
| 47 | function replaceDist(filePath) { |
| 48 | // Only match dist/ at the beginning of the path, followed by a filename |
| 49 | // This prevents matching strings like "distributed/file.js" or "some/dist/path" |
| 50 | return filePath.replace(/^(?:\.\/)?dist\/(?=.+)/, './') |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Recursively processes package.json `exports` to remove dist prefixes |
no outgoing calls
no test coverage detected