mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +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,
|
configFile = defaultNuxtConfigFile,
|
||||||
configContext = {},
|
configContext = {},
|
||||||
configOverrides = {},
|
configOverrides = {},
|
||||||
createRequire = module => isJest ? _createRequire(module.filename) : esm(module)
|
createRequire = module => isJest ? _createRequire(module.filename) : esm(module, { cache: false })
|
||||||
} = {}) {
|
} = {}) {
|
||||||
rootDir = path.resolve(rootDir)
|
rootDir = path.resolve(rootDir)
|
||||||
|
|
||||||
|
@ -461,7 +461,7 @@ export function getNuxtConfig (_options) {
|
|||||||
}
|
}
|
||||||
if (options.createRequire === 'esm') {
|
if (options.createRequire === 'esm') {
|
||||||
const esm = require('esm')
|
const esm = require('esm')
|
||||||
options.createRequire = module => esm(module)
|
options.createRequire = module => esm(module, { cache: false })
|
||||||
} else if (options.createRequire === 'jiti') {
|
} else if (options.createRequire === 'jiti') {
|
||||||
const jiti = require('jiti')
|
const jiti = require('jiti')
|
||||||
options.createRequire = module => jiti(module.filename)
|
options.createRequire = module => jiti(module.filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user