fix(modern): modulepreload not work in generate (#7498)

This commit is contained in:
Xin Du (Clark) 2020-06-12 10:18:16 +01:00 committed by GitHub
parent db65c2eb6b
commit 245d32d0dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ import path from 'path'
import fs from 'fs-extra'
import consola from 'consola'
import template from 'lodash/template'
import { isModernRequest, waitFor } from '@nuxt/utils'
import { TARGETS, isModernRequest, waitFor } from '@nuxt/utils'
import SPARenderer from './renderers/spa'
import SSRRenderer from './renderers/ssr'
@ -195,7 +195,7 @@ export default class VueRenderer {
return
}
if (!resources.modernManifest) {
if (!resources.modernManifest && options.target !== TARGETS.static) {
options.modern = false
return
}