New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
browserslist设置无效 #452
Comments
建议修改 return {
opts: {
presets: [
...(typescript ? [require.resolve('@babel/preset-typescript')] : []),
[require.resolve('@babel/preset-env'), {
- targets,
modules: type === 'esm' ? false : 'auto'
}],
...(isBrowser ? [require.resolve('@babel/preset-react')] : []),
], 去掉就可以构建了 import React from 'react';
/**
* title: Foo demo
* thumbnail: http://localhost:8080/#/calendar
* previewUrl: http://localhost:8080/#/calendar
*/
const Foo = _ref2 => {
let {
title = '你好'
} = _ref2;
return /*#__PURE__*/React.createElement("h1", null, title);
};
const Button = _ref => {
let {
type = 'primary',
children = null
} = _ref;
const abc = async params => {
console.log(params);
};
abc('111');
return /*#__PURE__*/React.createElement("button", {
type: "button",
className: type
}, children);
};
export { Button, Foo }; |
目前 targets 不支持自定义,正在做 father 的下个大版本,新版会支持 |
所以现在 4.0 了,怎么自定义呢,文档上没有看到 |
暂时还不支持 |
感谢 @huarse 的 PR #549 ,targets 配置项已在 father 4 中支持:https://github.com/umijs/father/blob/master/docs/config.md#targets issue 关闭 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
father-build@1.21.1
然后再
package.json
里面配置然后代码里面写
还是被降级了
The text was updated successfully, but these errors were encountered: