mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-23 17:10:07 +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() {
|
get plugins() {
|
||||||
return _.uniqBy(
|
return _.uniqBy(
|
||||||
this.options.plugins.map((p, i) => {
|
this.options.plugins.map(p => {
|
||||||
if (typeof p === 'string') p = { src: p }
|
if (typeof p === 'string') p = { src: p }
|
||||||
const pluginBaseName = path.basename(p.src, path.extname(p.src)).replace(
|
const pluginBaseName = path.basename(p.src, path.extname(p.src)).replace(
|
||||||
/[^a-zA-Z?\d\s:]/g,
|
/[^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 { shouldPush } = this.options.render.http2
|
||||||
const { publicPath } = this.resources.clientManifest
|
const { publicPath } = this.resources.clientManifest
|
||||||
|
|
||||||
preloadFiles.forEach(({ file, asType, fileWithoutQuery, extension }) => {
|
preloadFiles.forEach(({ file, asType, fileWithoutQuery }) => {
|
||||||
// By default, we only preload scripts or css
|
// By default, we only preload scripts or css
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (!shouldPush && asType !== 'script' && asType !== 'style') {
|
if (!shouldPush && asType !== 'script' && asType !== 'style') {
|
||||||
|
@ -139,7 +139,7 @@ export default class ModuleContainer {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise(resolve => {
|
||||||
// Call module with `this` context and pass options
|
// Call module with `this` context and pass options
|
||||||
const result = handler.call(this, 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 {
|
export default {
|
||||||
hooks(hook) {
|
hooks(hook) {
|
||||||
hook('build:done', builder => {
|
hook('build:done', () => {
|
||||||
consola.success('Compiled successfully')
|
consola.success('Compiled successfully')
|
||||||
})
|
})
|
||||||
hook('listen', (server, { port, host }) => {
|
hook('listen', (server, { port, host }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user