umijs / father-next Goto Github PK
View Code? Open in Web Editor NEWDevelopment version for father.
License: MIT License
Development version for father.
License: MIT License
alias: {
"@": "./src"
},
这个是我设置的,
但是打包出来的.js文件并不是走的相对路径而是直接替换
import AreaCascader from "./src/components/AreaCascader";
打包出来的.d.ts是没问题的
import { AreaCascaderProps } from "../AreaCascader";
有考虑过整合 Vue 么,市面上很少支持 Vue 的开发友好的文档工具
使用 dumi 打包组件库的时候,想要对 @ant-design/icons 进行按需加载,所以需要配置 webpack plugin,但是文档没有暴露出配置出来
Module not found: Error: Can't resolve '@babel/runtime/helpers/defineProperty' in '/Users/congxiaochen/Documents/alita/packages/request/dist'
"father": "^4.0.0-alpha.0",
import { defineConfig } from 'father';
export default defineConfig({
platform:'browser',
cjs:{
output:'dist'
}
});
只生成第一个d.ts文件之后就没有了。tsconfig.json配置都有declararation: true等配置。直接运行tsc命令会报其它错误,但也能正确将其它主要的.d.ts文件都生成出来,除了typings.d.ts没有正确处理。
event - Generate declaration file... 也是输出了的。因此有理由怀疑father build在执行过程中遇到了错误,但吞噬了错误,后续就没有进行了。
father有--verbose这一类的开关没有?找了一遍没发现,建议加上
为了和 Umi 主版本保持一致 + 此前做过一版纯 esbuild 的 father 3 alpha,所以计划直接发 father 4 了
father 4 介绍 + 任务集合,欢迎评论参与共建,做之前先认领(编辑主贴,加 @自己 ),避免冲突。
scheme.ts
,father 自身属性都做细致校验,比如 esm: { overrides: { ... } }
下只能配什么,三方仍然用 object
defineConfig
,用于 .fatherrc.ts
中补全配置类型 @cnyballk #15version
命令,分行追加输出 @vercel/ncc
、babel
、esbuild
、webpack
、typescript
、@microsoft/api-extractor
的版本号,并添加测试用例(mock console.log
)@xiaohuoni #14father build
支持可选 --no-clean
参数,构建前不清空输出目录 @xiaohuoni #12src/types.ts
里完善 @todo
的类型,从 @umijs/utils/compiled
和 @umijs/bundler-utils/compiled
里找 @zzcan #17bundless/index.ts
里对没匹配到配置的文件输出 debug 日志,使用 @umijs/utils
里的 debug
,命名空间用 father:bundless
@zzcan #18name
配置项,配置模块挂载的全局变量名称 @xiaohuoni #61prebundle
配置项添加顶层的 output
配置项 + 去掉 deps
内层的 output
配置项,并添加用例 @zzcan #30builder/config.ts
里 getConfigForFile
支持自动获取 tsconfig.json 中的 compilerOptions.paths
并转换为 alias
,并添加用例 @xierenyuan #21@umijs/bundler-webpack
开放 theme
和 lessLoader
配置项father doctor
命令extends
@PeachScript #11做组件库源码打包/编译
做框架/工具的依赖打包,类似 Umi 4
export =
语法 @PeachScript 99bfa64做项目的前置检查,给出研发建议或者错误
addRegularCheckup
添加标准检查(用户配置、最终配置、package.json、tsconfig.json 等)addSourceCheckup
添加源码检查(源码目录的每一个文件)addImportsCheckup
添加 imports 语句检查(import/await import/require
)基于 umi g 做原子工程化能力的生成
类似 ant-design 仓库的 changelog 生成能力,规划中...
如题,有些包希望在只支持 es5 的环境下也能使用。
组件里面有png图片,为什么会出现
No loader is configured for ".png" files,
是loder没解析png类型图片吗,感觉好奇怪也分析不出来
4.0.0-rc.3
export default {
esm: {
transformer: "babel",
output: "./es",
},
platform: "node",
alias: {
"@/": "./src/",
},
};
有计划支持命令行内参数吗,
比如:
father prebundle --output xxx
我看目前获取配置的方式是使用配置文件
todo里有说去monorepo, 那有考虑支持pnpm或者yarn的workspace配置吗?
同上,less放在组件下面会导致识别不了
版本号: "father": "^4.0.0-rc.8",
问题描述:
"compilerOptions": {
"paths": {
"@test/a": ["../a/src/index.ts"],
}
}
使用后,使用 father
打包,会发现编译后的文件,会将源码中的import a from @test/a
变成 import a from '../a/src/index.ts'
。
这个实在是有些不合理,为什么father
会去读取 tsconfig.json
里的内容,而不是读取father.rc里的配置做这个事情呢?
yarn add father-next -D
yarn add v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
error [email protected]: The platform "win32" is incompatible with this module.
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.