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

How exclude type which export by third library inside output? #341

Closed
underfin opened this issue Aug 22, 2020 · 2 comments · May be fixed by chncaption/esbuild#3
Closed

How exclude type which export by third library inside output? #341

underfin opened this issue Aug 22, 2020 · 2 comments · May be fixed by chncaption/esbuild#3

Comments

@underfin
Copy link

Description

import { VNode } from 'vue'; //The `VNode` is a type exported by `vue`
export { VNode };

The esbuild output is same as input(above code). The VNode should exclude inside output.

I transform code by use js api, like this await service.transform(src, options).

I realized this caused by the esbuild is lack of some type information from vue and mark VNode is a variable. But I don't konw how pass into esbuild.Hope get your some help for this.

The original issue is here vitejs/vite#731

@evanw
Copy link
Owner

evanw commented Aug 22, 2020

There's a fix already posted to that issue. See this comment here about enabling the "isolatedModules": true flag to enforce this: #314 (comment).

@underfin
Copy link
Author

Thanks a lot!

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 a pull request may close this issue.

2 participants