mirror of
https://github.com/retailcrm/vue-i18n-loader.git
synced 2024-11-25 14:56:04 +03:00
14 lines
271 B
JavaScript
14 lines
271 B
JavaScript
|
const hash = require('hash-sum')
|
||
|
const path = require('path')
|
||
|
|
||
|
const createId = (rootPath, resourcePath) => hash(
|
||
|
path
|
||
|
.relative(rootPath, resourcePath)
|
||
|
.replace(/^(\.\.[\/\\])+/, '')
|
||
|
.replace(/\\/g, '/')
|
||
|
)
|
||
|
|
||
|
module.exports = {
|
||
|
createId,
|
||
|
}
|