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

chore(timeline): add linebreaks to transform #508

Closed
wants to merge 1 commit into from
Closed

chore(timeline): add linebreaks to transform #508

wants to merge 1 commit into from

Conversation

dargmuesli
Copy link
Member

@dargmuesli dargmuesli commented Nov 5, 2023

Instead of concatenating all additions in a single line, the additions are split to one line each. This makes the transform's result easier to read:

import { __nuxtTimelineWrap } from "/...../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@nuxt/devtools/dist/runtime/function-metrics-helpers";
const abortNavigation = __nuxtTimelineWrap("abortNavigation", _$__abortNavigation);
const useNuxtApp = __nuxtTimelineWrap("useNuxtApp", _$__useNuxtApp);
const useRoute = __nuxtTimelineWrap("useRoute", _$__useRoute);
const useGetBreadcrumbItemProps = __nuxtTimelineWrap("useGetBreadcrumbItemProps", _$__useGetBreadcrumbItemProps);
const useHeadDefault = __nuxtTimelineWrap("useHeadDefault", _$__useHeadDefault);

instead of

import { __nuxtTimelineWrap } from "/...../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@nuxt/devtools/dist/runtime/function-metrics-helpers";const abortNavigation = __nuxtTimelineWrap("abortNavigation", _$__abortNavigation);const useNuxtApp = __nuxtTimelineWrap("useNuxtApp", _$__useNuxtApp);const useRoute = __nuxtTimelineWrap("useRoute", _$__useRoute);const useGetBreadcrumbItemProps = __nuxtTimelineWrap("useGetBreadcrumbItemProps", _$__useGetBreadcrumbItemProps);const useHeadDefault = __nuxtTimelineWrap("useHeadDefault", _$__useHeadDefault);

Instead of concatenating all additions in a single line, the additions are split to one line each. This makes the transform's result easier to read.
@antfu
Copy link
Member

antfu commented Nov 6, 2023

It's actually on purpose to not break source maps as much as possible.

@dargmuesli
Copy link
Member Author

Ahh, I see. Is there any way to make sourcemaps stay intact, e.g. by including transform for them as well?

@dargmuesli dargmuesli closed this Nov 6, 2023
@dargmuesli dargmuesli deleted the patch-1 branch November 6, 2023 05:23
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