Skip to content

Commit

Permalink
feat: support esbuild charset option (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq authored and pi0 committed Mar 27, 2023
1 parent ee1ced8 commit 9186985
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/builder/plugins/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { extname, relative } from "pathe";
import type { Plugin, PluginContext } from "rollup";
import { Loader, TransformResult, transform } from "esbuild";
import { Loader, TransformResult, Charset, transform } from "esbuild";
import { createFilter } from "@rollup/pluginutils";
import type { FilterPattern } from "@rollup/pluginutils";

Expand All @@ -18,6 +18,7 @@ export interface Options {
exclude?: FilterPattern;
sourceMap?: boolean;
minify?: boolean;
charset?: Charset;
target: string | string[];
jsxFactory?: string;
jsxFragment?: string;
Expand Down Expand Up @@ -84,6 +85,7 @@ export function esbuild(options: Options): Plugin {
loader,
target: options.target,
define: options.define,
charset: options.charset,
sourcemap: options.sourceMap,
sourcefile: id,
jsxFactory: options.jsxFactory,
Expand Down

0 comments on commit 9186985

Please sign in to comment.