diff --git a/lib/build.js b/lib/build.js index 38abb243a6..b5c23170e4 100644 --- a/lib/build.js +++ b/lib/build.js @@ -58,7 +58,7 @@ const defaults = { plugins: [], babel: {}, postcss: [], - templatesFiles: [] + templates: [] } const defaultsLoaders = [ { @@ -245,10 +245,9 @@ function * generateRoutesAndFiles () { // Resolve all internal template files relative to app directory templatesFiles = templatesFiles.map(file => { return {src: r(__dirname, 'app', file), dst: file} }) // Add external template files (used in modules) - if (Array.isArray(this.options.build.templatesFiles)) { - templatesFiles = templatesFiles.concat(this.options.build.templatesFiles) + if (Array.isArray(this.options.build.templates)) { + templatesFiles = templatesFiles.concat(this.options.build.templates) } - let moveTemplates = templatesFiles.map(({src, dst, options}) => { return readFile(src, 'utf8') .then((fileContent) => { diff --git a/lib/module.js b/lib/module.js index 3628212a96..4d4414a927 100755 --- a/lib/module.js +++ b/lib/module.js @@ -40,7 +40,7 @@ class Module { dst, options: template.options } - this.options.build.templatesFiles.push(templateObj) + this.options.build.templates.push(templateObj) return templateObj }