mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
refactor: remove unused variables (#3576)
This commit is contained in:
parent
7365702bff
commit
65d318d475
@ -63,7 +63,7 @@ export default class Builder {
|
||||
|
||||
get plugins() {
|
||||
return _.uniqBy(
|
||||
this.options.plugins.map((p, i) => {
|
||||
this.options.plugins.map(p => {
|
||||
if (typeof p === 'string') p = { src: p }
|
||||
const pluginBaseName = path.basename(p.src, path.extname(p.src)).replace(
|
||||
/[^a-zA-Z?\d\s:]/g,
|
||||
|
@ -47,7 +47,7 @@ export default async function nuxtMiddleware(req, res, next) {
|
||||
const { shouldPush } = this.options.render.http2
|
||||
const { publicPath } = this.resources.clientManifest
|
||||
|
||||
preloadFiles.forEach(({ file, asType, fileWithoutQuery, extension }) => {
|
||||
preloadFiles.forEach(({ file, asType, fileWithoutQuery }) => {
|
||||
// By default, we only preload scripts or css
|
||||
/* istanbul ignore if */
|
||||
if (!shouldPush && asType !== 'script' && asType !== 'style') {
|
||||
|
@ -139,7 +139,7 @@ export default class ModuleContainer {
|
||||
options = {}
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise(resolve => {
|
||||
// Call module with `this` context and pass options
|
||||
const result = handler.call(this, options)
|
||||
|
||||
|
2
test/fixtures/cli/cli.build.config.js
vendored
2
test/fixtures/cli/cli.build.config.js
vendored
@ -2,7 +2,7 @@ import consola from 'consola'
|
||||
|
||||
export default {
|
||||
hooks(hook) {
|
||||
hook('build:done', builder => {
|
||||
hook('build:done', () => {
|
||||
consola.success('Compiled successfully')
|
||||
})
|
||||
hook('listen', (server, { port, host }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user