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

是否可以支持 import ... from ... assert { type: 'xxx' } 这种格式 #437

Open
3 tasks done
l246804 opened this issue Nov 3, 2023 · 1 comment
Open
3 tasks done
Labels
enhancement New feature or request

Comments

@l246804
Copy link

l246804 commented Nov 3, 2023

Clear and concise description of the problem

我在项目中的 config.ts 里面定义了些复杂变量,使用 unplugin-auto-import 配置自动导入希望让其携带 assert {type:'macro'},编译时可以让 unplugin-macros` 将其处理成静态变量免去运行时开销。

示例代码(示例可能不准确,但大致如此):

// config.ts
function createOptions() {
  // ...
}

export const userOptions= createOptions()

export const selectOptions = createOptions()

Suggested solution

支持 assert { type: 'xxx' } 格式。

Alternative

No response

Additional context

No response

Validations

@l246804 l246804 added the enhancement New feature or request label Nov 3, 2023
@lishaobos
Copy link
Collaborator

目前是实现不了你这个功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants