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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .fatherrc.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { defineConfig } from 'father';
export default defineConfig({
cjs: {
output: 'dist',
sourcemap: true,
Copy link
Member

Choose a reason for hiding this comment

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

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

},
});
4 changes: 3 additions & 1 deletion packages/umi/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ let service: Service;

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

Choose a reason for hiding this comment

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

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

});
await service.run2({
name: 'setup',
args: { quiet: true },
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"esModuleInterop": true,
"module": "commonjs",
"moduleResolution": "node",
Expand Down
Loading