mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-14 03:11:19 -06:00
- avoid hitting the disk again when extracting / extending config files - normalize paths when reading files before invoking
13 lines
283 B
JavaScript
13 lines
283 B
JavaScript
const slash = require('slash')
|
|
|
|
module.exports = function normalizeFilePaths (files) {
|
|
Object.keys(files).forEach(file => {
|
|
const normalized = slash(file)
|
|
if (file !== normalized) {
|
|
files[normalized] = files[file]
|
|
delete files[file]
|
|
}
|
|
})
|
|
return files
|
|
}
|