rollup-plugin-esbuild
Advanced tools
Comparing version
import { Plugin } from 'rollup'; | ||
import { TransformOptions, BuildOptions, Loader } from 'esbuild'; | ||
import { MarkOptional } from 'ts-essentials'; | ||
import { FilterPattern } from '@rollup/pluginutils'; | ||
declare type MarkOptional<Type, Keys extends keyof Type> = Type extends Type ? Omit<Type, Keys> & Partial<Pick<Type, Keys>> : never; | ||
type Options$1 = Omit<TransformOptions, 'sourcemap'> & { | ||
@@ -8,0 +7,0 @@ sourceMap?: boolean; |
@@ -219,4 +219,4 @@ "use strict"; | ||
if (_loaders) { | ||
for (const key of Object.keys(_loaders)) { | ||
const value = _loaders[key]; | ||
for (let [key, value] of Object.entries(_loaders)) { | ||
key = key[0] === "." ? key : `.${key}`; | ||
if (typeof value === "string") { | ||
@@ -304,2 +304,9 @@ loaders[key] = value; | ||
target: "es2020", | ||
format: [ | ||
"base64", | ||
"binary", | ||
"dataurl", | ||
"text", | ||
"json" | ||
].includes(loader) ? "esm" : void 0, | ||
...esbuildOptions | ||
@@ -306,0 +313,0 @@ }); |
{ | ||
"name": "rollup-plugin-esbuild", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"packageManager": "pnpm@8.7.6", | ||
@@ -17,3 +17,4 @@ "main": "dist/index.js", | ||
"test": "vitest", | ||
"build": "rm -rf dist && tsup src/index.ts --format esm,cjs --dts-resolve", | ||
"build": "tsup", | ||
"dev": "tsup --watch", | ||
"prepublishOnly": "pnpm run build" | ||
@@ -20,0 +21,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26310
0.58%641
2.23%