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 {
|
return {
|
||||||
..._app(options),
|
..._app(),
|
||||||
..._common(options),
|
..._common(),
|
||||||
build: build(options),
|
build: build(),
|
||||||
messages: messages(options),
|
messages: messages(),
|
||||||
modes: modes(options),
|
modes: modes(),
|
||||||
render: render(options),
|
render: render(),
|
||||||
router: router(options),
|
router: router(),
|
||||||
server: server(options),
|
server: server(options),
|
||||||
cli: cli(options)
|
cli: cli()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,6 @@ export class WebpackBundler {
|
|||||||
'Using styleResources without the nuxt-style-resources-module is not suggested and can lead to severe performance issues.',
|
'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'
|
'Please use https://github.com/nuxt-community/style-resources-module'
|
||||||
)
|
)
|
||||||
}
|
|
||||||
for (const ext of Object.keys(styleResources)) {
|
for (const ext of Object.keys(styleResources)) {
|
||||||
await Promise.all(wrapArray(styleResources[ext]).map(async (p) => {
|
await Promise.all(wrapArray(styleResources[ext]).map(async (p) => {
|
||||||
const styleResourceFiles = await glob(path.resolve(this.context.options.rootDir, p))
|
const styleResourceFiles = await glob(path.resolve(this.context.options.rootDir, p))
|
||||||
@ -95,6 +94,7 @@ export class WebpackBundler {
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Configure compilers
|
// Configure compilers
|
||||||
this.compilers = compilersOptions.map((compilersOption) => {
|
this.compilers = compilersOptions.map((compilersOption) => {
|
||||||
|
@ -90,7 +90,7 @@ export default class Package {
|
|||||||
|
|
||||||
async writePackage() {
|
async writePackage() {
|
||||||
if (this.options.sortDependencies) {
|
if (this.options.sortDependencies) {
|
||||||
await this.sortDependencies()
|
this.sortDependencies()
|
||||||
}
|
}
|
||||||
const pkgPath = this.resolvePath(this.options.pkgPath)
|
const pkgPath = this.resolvePath(this.options.pkgPath)
|
||||||
this.logger.debug('Writing', pkgPath)
|
this.logger.debug('Writing', pkgPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user