mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-18 02:07:14 +00:00
Simpler dst file name generation
Module developers can easily customize filename using fileName key otherwise it is generated using `[dirname].[filename].[hash].[ext]` template
This commit is contained in:
parent
7835e3611d
commit
d57ea4de88
@ -31,8 +31,8 @@ class Module {
|
||||
return
|
||||
}
|
||||
// Generate unique and human readable dst filename
|
||||
const dst = template.dst ||
|
||||
((template.dstName || (path.basename(srcPath.dir) + '.' + srcPath.name)) + '.' + hash(src) + (template.dstExt || srcPath.ext))
|
||||
const dst = template.fileName ||
|
||||
(path.basename(srcPath.dir) + '.' + srcPath.name + '.' + hash(src) + '.' + srcPath.ext)
|
||||
|
||||
// Add to templates list
|
||||
const templateObj = {
|
||||
|
Loading…
Reference in New Issue
Block a user