mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
chore: tiny refactoring (#4534)
This commit is contained in:
parent
28300ee0f9
commit
657a6cc7c9
@ -16,14 +16,14 @@ export function getDefaultNuxtConfig(options = {}) {
|
||||
}
|
||||
|
||||
return {
|
||||
..._app(options),
|
||||
..._common(options),
|
||||
build: build(options),
|
||||
messages: messages(options),
|
||||
modes: modes(options),
|
||||
render: render(options),
|
||||
router: router(options),
|
||||
..._app(),
|
||||
..._common(),
|
||||
build: build(),
|
||||
messages: messages(),
|
||||
modes: modes(),
|
||||
render: render(),
|
||||
router: router(),
|
||||
server: server(options),
|
||||
cli: cli(options)
|
||||
cli: cli()
|
||||
}
|
||||
}
|
||||
|
@ -85,15 +85,15 @@ export class WebpackBundler {
|
||||
'Using styleResources without the nuxt-style-resources-module is not suggested and can lead to severe performance issues.',
|
||||
'Please use https://github.com/nuxt-community/style-resources-module'
|
||||
)
|
||||
}
|
||||
for (const ext of Object.keys(styleResources)) {
|
||||
await Promise.all(wrapArray(styleResources[ext]).map(async (p) => {
|
||||
const styleResourceFiles = await glob(path.resolve(this.context.options.rootDir, p))
|
||||
for (const ext of Object.keys(styleResources)) {
|
||||
await Promise.all(wrapArray(styleResources[ext]).map(async (p) => {
|
||||
const styleResourceFiles = await glob(path.resolve(this.context.options.rootDir, p))
|
||||
|
||||
if (!styleResourceFiles || styleResourceFiles.length === 0) {
|
||||
throw new Error(`Style Resource not found: ${p}`)
|
||||
}
|
||||
}))
|
||||
if (!styleResourceFiles || styleResourceFiles.length === 0) {
|
||||
throw new Error(`Style Resource not found: ${p}`)
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
// Configure compilers
|
||||
|
@ -90,7 +90,7 @@ export default class Package {
|
||||
|
||||
async writePackage() {
|
||||
if (this.options.sortDependencies) {
|
||||
await this.sortDependencies()
|
||||
this.sortDependencies()
|
||||
}
|
||||
const pkgPath = this.resolvePath(this.options.pkgPath)
|
||||
this.logger.debug('Writing', pkgPath)
|
||||
|
Loading…
Reference in New Issue
Block a user