aboutsummaryrefslogtreecommitdiff
path: root/src/options.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-05-03 20:29:38 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-05-03 20:29:38 -0700
commitca2a3f69ffdfd59900ead5af8c93d46d55af5187 (patch)
treeb5314ffeef7c36504ff69353fa3f433dd354bd05 /src/options.zig
parent1b3d46d92cde4b74aae0bb43400defcc6ad57c9a (diff)
downloadbun-ca2a3f69ffdfd59900ead5af8c93d46d55af5187.tar.gz
bun-ca2a3f69ffdfd59900ead5af8c93d46d55af5187.tar.zst
bun-ca2a3f69ffdfd59900ead5af8c93d46d55af5187.zip
hm
Former-commit-id: 1d44b63675a64567d0b74e05d4f5bafaa56976ba
Diffstat (limited to 'src/options.zig')
-rw-r--r--src/options.zig16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/options.zig b/src/options.zig
index e7120ca07..9106fbdf6 100644
--- a/src/options.zig
+++ b/src/options.zig
@@ -29,8 +29,17 @@ pub const defaultLoaders = std.ComptimeStringMap(Loader, .{
pub const JSX = struct {
parse: bool = true,
- factory: string = "React.createElement",
- fragment: string = "jsx",
+ factory: string = "createElement",
+ fragment: string = "Fragment",
+ jsx: string = "jsxDEV",
+ runtime: Runtime = Runtime.automatic,
+ development: bool = true,
+
+ /// Set on a per file basis like this:
+ /// /** @jsxImportSource @emotion/core */
+ import_source: string = "react",
+
+ pub const Runtime = enum { classic, automatic };
};
const TypeScript = struct {
@@ -44,7 +53,8 @@ pub const TransformOptions = struct {
loader: Loader = Loader.tsx,
resolve_dir: string = "/",
jsx_factory: string = "React.createElement",
- jsx_fragment: string = "jsx",
+ jsx_fragment: string = "Fragment",
+ jsx_import_source: string = "react",
ts: bool = true,
react_fast_refresh: bool = false,
inject: ?[]string = null,