Skip to content
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

feat: umd support mako bundler #750

Merged
merged 15 commits into from
Jun 4, 2024
Merged

feat: umd support mako bundler #750

merged 15 commits into from
Jun 4, 2024

Conversation

xiaohuoni
Copy link
Member

@xiaohuoni xiaohuoni commented Apr 7, 2024

配置变化

.fatherrc.ts 新增 umd: { bundler: 'webpack' | 'mako' } 的配置项做切换

环境变量

OKAM=@alipay/umi-bundler-okam 指定 mako bundler

examples/mako

➜  mako git:(mako) ✗ pnpm build

> @ build /father/examples/mako
> OKAM=@alipay/umi-bundler-okam father build

info  - @local
info  - Clean output directories
Building with mako for production...
15 modules transformed in 79ms.
basic optimize in 0ms.
dist/index.min.js       145.61 kB │ map: 351.90 kB
✓ Built in 211ms
Complete!

path.dirname(require.resolve('@umijs/bundler-webpack/package.json')),
);

const makoBundler = importLazy(
// path.dirname(require.resolve('/Users/xiaoxiao/work/mako/packages/bundler-mako/package.json')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1

watch: opts.watch,
DevServer: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devServer

},
}
: {}),
onBuildComplete({ isFirstCompile, close }: any) {
Copy link
Member

@PeachScript PeachScript Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onBuildComplete 在 dev 时是不执行的,后续结合 onDevCompileDone 优化日志输出,以及 bundler-webpack 是否能统一使用 onDevCompileDone

@Jinbao1001 Jinbao1001 changed the base branch from master to feature/4.5.0 June 4, 2024 10:30
@Jinbao1001 Jinbao1001 merged commit b3697aa into feature/4.5.0 Jun 4, 2024
7 checks passed
@delete-merged-branch delete-merged-branch bot deleted the mako branch June 4, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants