mirror of
https://github.com/retailcrm/vue-i18n-loader.git
synced 2024-11-22 13:26:06 +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,
|
|
}
|