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: webpack plugin #2699

Merged
merged 30 commits into from
Oct 30, 2023
Merged

feat: webpack plugin #2699

merged 30 commits into from
Oct 30, 2023

Conversation

nayonglin
Copy link

Description of change
  • [Task] qiankun webpack 插件 #2678 完成webpack插件第一版本开发,支持自动修改output相关属性。
  • 增加webpack插件README.md
  • webpack4和5项目改造为qiankun子应用直接使用该插件即可。
  • 验证webpack4和webpack5使用正常。
  • examples目录新增react15-plugin和react16-plugin示例,分别对应webpack4和webpack5项目。

@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2023

🦋 Changeset detected

Latest commit: 996f340

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@qiankunjs/webpack-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 25, 2023

@nayonglin is attempting to deploy a commit to a Personal Account owned by @umijs on Vercel.

@umijs first needs to authorize it.

@kuitos kuitos marked this pull request as draft September 25, 2023 11:26
@nayonglin nayonglin changed the title Feat/webpack plugin feat: webpack plugin Sep 25, 2023
Copy link
Member

@kuitos kuitos left a comment

Choose a reason for hiding this comment

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

好像还没有设置 entry script 的功能?

packages/sandbox/src/core/sandbox/globals.ts Outdated Show resolved Hide resolved
packages/qiankunOutputPlugin/src/index.js Outdated Show resolved Hide resolved
packages/qiankunOutputPlugin/package.json Outdated Show resolved Hide resolved
@nayonglin
Copy link
Author

好像还没有设置 entry script 的功能?

对的,先提交了output相关的功能,entry的我还在开发

@kuitos
Copy link
Member

kuitos commented Sep 25, 2023

OK,那我先标记成 WIP

pnpm-lock.yaml Outdated Show resolved Hide resolved
@nayonglin
Copy link
Author

OK,那我先标记成 WIP

给最后一个非异步脚本增加entry标记的提交了哈,有空可以review一下,我没有依赖html-webpack-plugin。
react15-plugin和react16-plugin验证ok。

@aladdin-add aladdin-add requested a review from kuitos October 8, 2023 05:56
@nayonglin
Copy link
Author

CI 挂了,看了下是 pnpm-lock 没更新导致的,可以更新后重新提交一下吗 @nayonglin 其他应该没啥问题了

已提交,再试试呢

@aladdin-add
Copy link
Contributor

还是报错了,我重新更新了一下,可以执行一下:

git cherry-pick b95e39be38ff41d3aa99d178c6759e2bc13896a1

@nayonglin
Copy link
Author

还是报错了,我重新更新了一下,可以执行一下:

git cherry-pick b95e39be38ff41d3aa99d178c6759e2bc13896a1

搞定,已提交

@aladdin-add
Copy link
Contributor

之前的eslint配置都是针对ts的,可能不适合cjs,我重新修改了一下 : #2762

@nayonglin
Copy link
Author

之前的eslint配置都是针对ts的,可能不适合cjs,我重新修改了一下 : #2762

嗯嗯 ,那是等2762合入,这里才合入对吧?

@aladdin-add
Copy link
Contributor

已merge,请再拉一下最新的提交~

@nayonglin
Copy link
Author

已merge,请再拉一下最新的提交~

已合并push哈,可以看看

@kuitos
Copy link
Member

kuitos commented Oct 27, 2023

CI 挂了,看着都是 ts lint 问题,有空修一下吗? @nayonglin

@nayonglin
Copy link
Author

CI 挂了,看着都是 ts lint 问题,有空修一下吗? @nayonglin

CI 挂了,看着都是 ts lint 问题,有空修一下吗? @nayonglin

done

@kuitos
Copy link
Member

kuitos commented Oct 27, 2023

还是挂了,这次是prettier

@nayonglin
Copy link
Author

CI 挂了,看着都是 ts lint 问题,有空修一下吗? @nayonglin

还是挂了,这次是prettier

done

@nayonglin
Copy link
Author

CI 挂了,看着都是 ts lint 问题,有空修一下吗? @nayonglin

还是挂了,这次是prettier

done

@kuitos 看到了新的ci报错,build的时候把tests的两个自动化测试项目也构建了,但实际应该不需要构建,是不是需要优化一下构建命令为
pnpm -r --filter=./packages/**/* --filter=!./packages/webpack-plugin/tests/* run build

@kuitos
Copy link
Member

kuitos commented Oct 29, 2023

pnpm -r --filter=./packages/**/src run build 这样改一下应该可以,只 build src 目录就行

@nayonglin
Copy link
Author

pnpm -r --filter=./packages/**/src run build 这样改一下应该可以,只 build src 目录就行

本地试了一下,这样好像所有项目都匹配不到了,改成pnpm -r --filter=./packages//* --filter=!./packages//tests/* run build是否可行?比我之前写的更通用一些,代码已提交

package.json Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@kuitos kuitos merged commit b26e03a into umijs:next Oct 30, 2023
3 checks passed
@kuitos kuitos linked an issue Nov 7, 2023 that may be closed by this pull request
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.

[Task] qiankun webpack 插件
3 participants