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

[WIP] feat: add sourcemap && improve getUmiAlias #11883

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xc1427
Copy link
Contributor

@xc1427 xc1427 commented Nov 21, 2023

  • feat: getUmiAlias actually call "setup" service to collect umi alias. It has a defect when used to test umi-plugin. It will ready the config file in user's project and that could result "invalid config key" error. It can be improved by allowing developer to specify a config path.
  • chore: add sourcemap & declarationMap generation to improve DX when developing umi.

Copy link

vercel bot commented Nov 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
umi ⬜️ Ignored (Inspect) Visit Preview Nov 21, 2023 6:10am

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (2fc2a8c) 28.89% compared to head (6aa0881) 28.89%.
Report is 1 commits behind head on master.

Files Patch % Lines
packages/umi/src/test.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11883   +/-   ##
=======================================
  Coverage   28.89%   28.89%           
=======================================
  Files         488      488           
  Lines       14892    14892           
  Branches     3538     3538           
=======================================
  Hits         4303     4303           
  Misses       9829     9829           
  Partials      760      760           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xc1427 xc1427 changed the title feat: add sourcemap && improve getUmiAlias [WIP] feat: add sourcemap && improve getUmiAlias Nov 21, 2023
@@ -32,7 +32,9 @@ let service: Service;

export async function getUmiAlias() {
if (!service) {
service = new Service();
service = new Service({
defaultConfigFiles: [],
Copy link
Contributor

Choose a reason for hiding this comment

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

为啥不需要 umirc 里的东西,用户的 alias 这样就收集不到了。

@@ -3,5 +3,6 @@ import { defineConfig } from 'father';
export default defineConfig({
cjs: {
output: 'dist',
sourcemap: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

如果要带着 sourcemap 发到 npm 上的话,体积就变的特别大,目前几乎看不到把 sourcemap 发到 npm 上的。

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.

2 participants