Closed OlkaB closed 2 months ago
@davidnixon thank you for a review.
I'm not sure where should I place the code you've provided
const indexDir = path.dirname(INDEX_FILE_PATH);
return './' + path.relative(indexDir, systemPath);
the only place, which provides systemPath
variable is convertToImportPathRelativeToIndex
method. Is this a place which you meant (so match should use the code returned by what you wrote)?
Sorry for asking, but I do not know how GH pipelines works or how to check it, as locally it works for me (which seems not to be helpful in this case😌).
btw. this is what I receive in ./src/index.js when running locally
Sorry yeah I just replaced the contents of convertToImportPathRelativeToIndex with
function convertToImportPathRelativeToIndex(systemPath) {
const indexDir = path.dirname(INDEX_FILE_PATH);
return './' + path.relative(indexDir, systemPath);
}
That works for me locally. I think I see the issue. You are on a windows box I think? So this regex
const UNNECESSARY_SYSTEM_PATH_CHUNK_REGEX = /.*\\src\\(.*)/;
works if I flip to \ to \/. If the path.relative
I think that's a clear look to the function.
Indeed - I'm working on Windows machine. Thank you very much for the help and explanation. I've made a changes as suggested.
Contributes to #1578
What did you do?
Added prebuild script to auto add named exports of components
Why did you do it?
This was option available in Vue2 and change from it large repo requires additional piece of work, so prefer to restore it at source
How have you tested it?
run build script then generated local tgz package and tested in Vue3 repo
Were docs updated if needed?