Skip to content

Conversation

@sxzz
Copy link
Member

@sxzz sxzz commented Jun 10, 2023

<script setup lang="ts">
import { defineProps as props } from 'vue';

const props = props<{ foo: string }>()
</script>

@sxzz sxzz added the ready to merge The PR is ready to be merged. label Jul 11, 2023
@sxzz sxzz force-pushed the feat/alias-macros branch 2 times, most recently from ca562aa to 027833a Compare July 12, 2023 06:07
@sxzz sxzz force-pushed the feat/alias-macros branch from 027833a to 7ce2962 Compare November 21, 2023 07:38
@github-actions
Copy link

github-actions bot commented Nov 21, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 90.9 kB 34.6 kB 31.1 kB
vue.global.prod.js 148 kB 53.8 kB 48.1 kB

Usages

Name Size Gzip Brotli
createApp 50.9 kB 19.9 kB 18.1 kB
createSSRApp 54.2 kB 21.3 kB 19.3 kB
defineCustomElement 53.2 kB 20.6 kB 18.8 kB
overall 64.7 kB 24.9 kB 22.6 kB

@sxzz sxzz changed the title feat(compiler-sfc): support macros alias fix(compiler-sfc): support macros alias Jan 27, 2024
@sxzz sxzz force-pushed the feat/alias-macros branch from 7ce2962 to 60f619e Compare January 27, 2024 12:26
@sxzz sxzz requested a review from yyx990803 January 27, 2024 12:27
@yyx990803
Copy link
Member

I thought about this again and my conclusion is that we don't really want this. Users have gotten used to macros being "just available" inside <script setup> - allowing aliasing actually only creates ways to make the code look different and less consistent across codebases.

@yyx990803 yyx990803 closed this May 30, 2024
@sxzz
Copy link
Member Author

sxzz commented May 30, 2024

We should at least report a warning if users do that.

@yyx990803
Copy link
Member

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge The PR is ready to be merged.

Projects

Status: Rejected

Development

Successfully merging this pull request may close these issues.

3 participants