gpt4 book ai didi

jestjs - 尝试构建 Jest 抛出 "Caching was left unconfigured."

转载 作者:行者123 更新时间:2023-12-03 13:40:13 26 4
gpt4 key购买 nike

我有以下 .babelrc.js在根文件夹中:

{
"plugins": [
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-transform-modules-commonjs",
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-transform-strict-mode",
"@babel/plugin-transform-runtime"
],
"cache": "true"
}

但是当它尝试运行时 node ./packages/jest-cli/bin/jest.js我懂了:

Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured for various types of caching, using the first param of their handler functions:



我错过了什么?

最佳答案

使用新 babel.config.js
https://new.babeljs.io/docs/en/next/babelconfigjs.html

module.exports = function(api) {
api.cache(true)
return {
plugins: [
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-transform-modules-commonjs",
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-transform-strict-mode",
"@babel/plugin-transform-runtime"
]
}
}

关于jestjs - 尝试构建 Jest 抛出 "Caching was left unconfigured.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50939445/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com