Steps to reproduce the behavior:1. 2. Expected behavior1. 2. Context Umi Version: Node Version: Platform: github-actionsbotclosed this asnot plannedWon't fix, can't repro, duplicate, staleMay 10, 2024 Assignees No one assigned Labels ...
在@umijs/max库中,request函数是用于发送HTTP请求的。要设置请求的超时时间,你需要在配置对象中指定timeout属性。下面是如何在@umijs/max的request函数中设置超时时间的详细步骤: 了解request函数的配置: request函数接受一个URL和一个配置对象作为参数。配置对象中可以包含多种选项,如请求头、请求方法、超时时间等。
import request from 'umi-request'; request .get('/api/v1/xxx?id=1') .then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); }); // 也可将 URL 的参数放到 options.params 里 request .get('/api/v1/xxx', { params: { id: 1, }, })...
Summary by CodeRabbit 新功能 添加了将动态导入转换为 require 语句的功能。在 lazy.ts 中引入了一个包含 lazy 属性的默认导出对象。新增 mako.config.json,为 Node.js 平台配置动态导入到 require 语句的转换。 测试 为动态导入到 require 功能添加了测试用例。
主分支用最新 expect 会有以下错误 AssertionError [ERR_ASSERTION]: dynamic imported module(foo) not existss 解 require 补上 unresolve mark applied span 重构,删除部分函数
Background umijs/umi#12427 How to reproduce it? let a = 'a'; let c = import(/* webpackIgnore: true */`${a}`); console.log(c); or import react-player in your project. import x from 'react-player'; console.log(x); Then run build. Build fai...
import { a } from 'x'; import a from 'x'; import * as a from 'x'; 如果模块 x 有副作用,但是变量 a 没有被使用,tree-shaking 完应该变成: import 'x'; 现在 master 只有 1 加了这个优化,补充 2 和 3 Summary by CodeRabbit New Features Enhanced tree shaking
修复在 call_expr 中的动态 require/import 未被正常转换的问题,原因是 visitor 没有继续 visit call_expr 的子节点增加了两个用例: import(...).then(...),测试 call_expr -> member_expr -> call_expr 的场景 import(...${require(...)}...),测试 call_expr -> call
umijs / dumi Public Notifications Fork 1.2k Star 3.6k New issue Jump to bottom fix: builtin import path #2235 Merged Jinbao1001 merged 1 commit into master from fix/builtin_path Dec 10, 2024 +1 −1 Conversation 2 Commits 1 Checks 9 Files changed 1 Conversation Member Jinbao...
delete-merged-branchbotdeleted thefeat/import-to-await-require-exportbranch2 years ago Reviewers No reviews Assignees No one assigned Labels None yet Projects None yet Milestone No milestone Linked issues Successfully merging this pull request may close these issues. None yet 1 participant...