-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Codecov ReportAttention:
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. |
@@ -32,7 +32,9 @@ let service: Service; | |||
|
|||
export async function getUmiAlias() { | |||
if (!service) { | |||
service = new Service(); | |||
service = new Service({ | |||
defaultConfigFiles: [], |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果要带着 sourcemap 发到 npm 上的话,体积就变的特别大,目前几乎看不到把 sourcemap 发到 npm 上的。
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.