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