mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(module): correct errors when template is Object
This commit is contained in:
parent
3b4955152e
commit
05efd73136
@ -28,7 +28,7 @@ export default class ModuleContainer {
|
||||
addTemplate(template) {
|
||||
/* istanbul ignore if */
|
||||
if (!template) {
|
||||
throw new Error('Invalid template:' + template)
|
||||
throw new Error('Invalid template:' + JSON.stringify(template))
|
||||
}
|
||||
|
||||
// Validate & parse source
|
||||
@ -36,7 +36,7 @@ export default class ModuleContainer {
|
||||
const srcPath = path.parse(src)
|
||||
/* istanbul ignore if */
|
||||
if (!src || typeof src !== 'string' || !fs.existsSync(src)) {
|
||||
throw new Error('Template not found:' + template)
|
||||
throw new Error('Template src not found:' + src)
|
||||
}
|
||||
|
||||
// Generate unique and human readable dst filename
|
||||
|
Loading…
Reference in New Issue
Block a user