oxc-transform
Advanced tools
Comparing version
@@ -326,2 +326,6 @@ /* auto-generated by NAPI-RS */ | ||
export interface PluginsOptions { | ||
styledComponents?: StyledComponentsOptions | ||
} | ||
export interface ReactRefreshOptions { | ||
@@ -344,2 +348,81 @@ /** | ||
/** | ||
* Configure how styled-components are transformed. | ||
* | ||
* @see {@link https://styled-components.com/docs/tooling#babel-plugin} | ||
*/ | ||
export interface StyledComponentsOptions { | ||
/** | ||
* Enhances the attached CSS class name on each component with richer output to help | ||
* identify your components in the DOM without React DevTools. | ||
* | ||
* @default true | ||
*/ | ||
displayName?: boolean | ||
/** | ||
* Controls whether the `displayName` of a component will be prefixed with the filename | ||
* to make the component name as unique as possible. | ||
* | ||
* @default true | ||
*/ | ||
fileName?: boolean | ||
/** | ||
* Adds a unique identifier to every styled component to avoid checksum mismatches | ||
* due to different class generation on the client and server during server-side rendering. | ||
* | ||
* @default true | ||
*/ | ||
ssr?: boolean | ||
/** | ||
* Transpiles styled-components tagged template literals to a smaller representation | ||
* than what Babel normally creates, helping to reduce bundle size. | ||
* | ||
* @default true | ||
*/ | ||
transpileTemplateLiterals?: boolean | ||
/** | ||
* Minifies CSS content by removing all whitespace and comments from your CSS, | ||
* keeping valuable bytes out of your bundles. | ||
* | ||
* @default true | ||
*/ | ||
minify?: boolean | ||
/** | ||
* Enables transformation of JSX `css` prop when using styled-components. | ||
* | ||
* **Note: This feature is not yet implemented in oxc.** | ||
* | ||
* @default true | ||
*/ | ||
cssProp?: boolean | ||
/** | ||
* Enables "pure annotation" to aid dead code elimination by bundlers. | ||
* | ||
* @default false | ||
*/ | ||
pure?: boolean | ||
/** | ||
* Adds a namespace prefix to component identifiers to ensure class names are unique. | ||
* | ||
* Example: With `namespace: "my-app"`, generates `componentId: "my-app__sc-3rfj0a-1"` | ||
*/ | ||
namespace?: string | ||
/** | ||
* List of file names that are considered meaningless for component naming purposes. | ||
* | ||
* When the `fileName` option is enabled and a component is in a file with a name | ||
* from this list, the directory name will be used instead of the file name for | ||
* the component's display name. | ||
* | ||
* @default ["index"] | ||
*/ | ||
meaninglessFileNames?: Array<string> | ||
/** | ||
* Import paths to be considered as styled-components imports at the top level. | ||
* | ||
* **Note: This feature is not yet implemented in oxc.** | ||
*/ | ||
topLevelImportPaths?: Array<string> | ||
} | ||
/** | ||
* Transpile a JavaScript or TypeScript into a target ECMAScript version. | ||
@@ -364,4 +447,4 @@ * | ||
export interface TransformOptions { | ||
/** Treat the source text as `js`, `jsx`, `ts`, or `tsx`. */ | ||
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | ||
/** Treat the source text as `js`, `jsx`, `ts`, `tsx`, or `dts`. */ | ||
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts' | ||
/** Treat the source text as `script` or `module` code. */ | ||
@@ -413,2 +496,4 @@ sourceType?: 'script' | 'module' | 'unambiguous' | undefined | ||
decorator?: DecoratorOptions | ||
/** Third-party plugins to use. */ | ||
plugins?: PluginsOptions | ||
} | ||
@@ -415,0 +500,0 @@ |
{ | ||
"name": "oxc-transform", | ||
"version": "0.76.0", | ||
"version": "0.77.0", | ||
"main": "index.js", | ||
@@ -67,20 +67,21 @@ "browser": "browser.js", | ||
"optionalDependencies": { | ||
"@oxc-transform/binding-win32-x64-msvc": "0.76.0", | ||
"@oxc-transform/binding-win32-arm64-msvc": "0.76.0", | ||
"@oxc-transform/binding-linux-x64-gnu": "0.76.0", | ||
"@oxc-transform/binding-linux-x64-musl": "0.76.0", | ||
"@oxc-transform/binding-freebsd-x64": "0.76.0", | ||
"@oxc-transform/binding-linux-arm64-gnu": "0.76.0", | ||
"@oxc-transform/binding-linux-arm64-musl": "0.76.0", | ||
"@oxc-transform/binding-linux-arm-gnueabihf": "0.76.0", | ||
"@oxc-transform/binding-linux-arm-musleabihf": "0.76.0", | ||
"@oxc-transform/binding-linux-s390x-gnu": "0.76.0", | ||
"@oxc-transform/binding-linux-riscv64-gnu": "0.76.0", | ||
"@oxc-transform/binding-darwin-x64": "0.76.0", | ||
"@oxc-transform/binding-darwin-arm64": "0.76.0", | ||
"@oxc-transform/binding-android-arm64": "0.76.0", | ||
"@oxc-transform/binding-wasm32-wasi": "0.76.0" | ||
"@oxc-transform/binding-win32-x64-msvc": "0.77.0", | ||
"@oxc-transform/binding-win32-arm64-msvc": "0.77.0", | ||
"@oxc-transform/binding-linux-x64-gnu": "0.77.0", | ||
"@oxc-transform/binding-linux-x64-musl": "0.77.0", | ||
"@oxc-transform/binding-freebsd-x64": "0.77.0", | ||
"@oxc-transform/binding-linux-arm64-gnu": "0.77.0", | ||
"@oxc-transform/binding-linux-arm64-musl": "0.77.0", | ||
"@oxc-transform/binding-linux-arm-gnueabihf": "0.77.0", | ||
"@oxc-transform/binding-linux-arm-musleabihf": "0.77.0", | ||
"@oxc-transform/binding-linux-s390x-gnu": "0.77.0", | ||
"@oxc-transform/binding-linux-riscv64-gnu": "0.77.0", | ||
"@oxc-transform/binding-darwin-x64": "0.77.0", | ||
"@oxc-transform/binding-darwin-arm64": "0.77.0", | ||
"@oxc-transform/binding-android-arm64": "0.77.0", | ||
"@oxc-transform/binding-wasm32-wasi": "0.77.0" | ||
}, | ||
"scripts": { | ||
"build-dev": "napi build --platform", | ||
"build-test": "pnpm run build", | ||
"build": "pnpm run build-dev --features allocator --release", | ||
@@ -87,0 +88,0 @@ "postbuild-dev": "node patch.mjs", |
33877
8.13%975
9.3%