mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(core, config): disabe esm cache (#7839)
This commit is contained in:
parent
e6eae8ff69
commit
f130901ab1
@ -18,7 +18,7 @@ export async function loadNuxtConfig ({
|
||||
configFile = defaultNuxtConfigFile,
|
||||
configContext = {},
|
||||
configOverrides = {},
|
||||
createRequire = module => isJest ? _createRequire(module.filename) : esm(module)
|
||||
createRequire = module => isJest ? _createRequire(module.filename) : esm(module, { cache: false })
|
||||
} = {}) {
|
||||
rootDir = path.resolve(rootDir)
|
||||
|
||||
|
@ -461,7 +461,7 @@ export function getNuxtConfig (_options) {
|
||||
}
|
||||
if (options.createRequire === 'esm') {
|
||||
const esm = require('esm')
|
||||
options.createRequire = module => esm(module)
|
||||
options.createRequire = module => esm(module, { cache: false })
|
||||
} else if (options.createRequire === 'jiti') {
|
||||
const jiti = require('jiti')
|
||||
options.createRequire = module => jiti(module.filename)
|
||||
|
Loading…
Reference in New Issue
Block a user