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

Support bundle with webpack #49

Open
sorrycc opened this issue Nov 14, 2024 · 2 comments
Open

Support bundle with webpack #49

sorrycc opened this issue Nov 14, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@sorrycc
Copy link
Member

sorrycc commented Nov 14, 2024

Problem

目前只有 Mako 的打包方式,但有时可能出于稳定性、产物尺寸、code splitting 策略、对比等因素的考虑,会需要更老牌的 webpack 的构建方式。

Solution

提供 webpack 的构建方式,坑已经挖好,在 src/bundler/bundler_webpack.ts 里写。

逻辑是这样。

1、参考 bundler_mako.ts,基于 @umijs/bundler-webpack 实现
2、tnf 不内置 @umijs/bundler-webpack 依赖,用到了再提示用户安装
3、bundler_webpack.ts 里两个方法,应该只要实现 build 就够
4、examples/normal 里配置 bundler: 'webpack' 验证

Alternatives

No response

Importance

nice to have

Additional Information

No response

@sorrycc sorrycc added the good first issue Good for newcomers label Nov 14, 2024
@sorrycc sorrycc changed the title 提供 webpack 的打包方式供选择 Support bundle with webpack Nov 14, 2024
@xiaohuoni xiaohuoni mentioned this issue Dec 20, 2024
6 tasks
@xiaohuoni
Copy link
Member

tnf 不内置 @umijs/bundler-webpack 依赖,用到了再提示用户安装 触发 doctor 报错 @sorrycc

@xiaohuoni
Copy link
Member

doctor 好像没有绕过手段?@sorrycc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants