diff options
author | 2021-05-03 20:29:38 -0700 | |
---|---|---|
committer | 2021-05-03 20:29:38 -0700 | |
commit | ca2a3f69ffdfd59900ead5af8c93d46d55af5187 (patch) | |
tree | b5314ffeef7c36504ff69353fa3f433dd354bd05 /src/options.zig | |
parent | 1b3d46d92cde4b74aae0bb43400defcc6ad57c9a (diff) | |
download | bun-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.zig | 16 |
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, |