-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: support jsx
and tsx
files
#71
Conversation
Codecov Report
@@ Coverage Diff @@
## main #71 +/- ##
==========================================
+ Coverage 96.44% 96.51% +0.06%
==========================================
Files 8 8
Lines 535 545 +10
Branches 96 99 +3
==========================================
+ Hits 516 526 +10
Misses 19 19
|
@liuyang0826 instead of adding two options, what about adding a single + import type { TransformOptions } from "esbuild";
export interface LoaderOptions {
ext?: 'mjs' | 'js' | 'ts'
format?: 'cjs' | 'esm'
declaration?: boolean
- jsxFactory?: string
- jsxFragment?: string
+ esbuild?: TransformOptions
} In this way, we could pass those options to the ts loader as well and let the user set other useful options like the mkdist({
srcDir: 'src',
format: 'esm',
// ...
esbuild: {
target: ['es2018'],
jsxFactory: 'h',
}
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
No description provided.