defaults deep options

This will help modules easily append to options without need to checking and creating arrays.
This commit is contained in:
Pooya Parsa 2017-05-11 14:12:20 +04:30
parent 5662aa22f7
commit ffefa6d724

View File

@ -18,7 +18,12 @@ class Nuxt {
var defaults = {
dev: true,
env: {},
head: {},
head: {
meta: [],
link: [],
style: [],
script: []
},
plugins: [],
css: [],
modules: [],
@ -50,7 +55,11 @@ class Nuxt {
webpack: {},
chokidar: {}
},
build: {}
build: {
postcss: [],
vendor: [],
plugins: []
}
}
// Sanitization
if (options.loading === true) delete options.loading