{"id":13677952,"url":"https://github.com/eryue0220/unplugin-stylex","last_synced_at":"2025-04-29T12:32:33.341Z","repository":{"id":214348599,"uuid":"734762691","full_name":"eryue0220/unplugin-stylex","owner":"eryue0220","description":"StyleX integration for Vite, esbuild, webpack, rollup and rspack.","archived":false,"fork":false,"pushed_at":"2024-10-29T04:56:30.000Z","size":780,"stargazers_count":18,"open_issues_count":16,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T05:30:53.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eryue0220.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-22T14:47:46.000Z","updated_at":"2024-10-29T04:53:09.000Z","dependencies_parsed_at":"2024-03-25T11:45:27.514Z","dependency_job_id":"3f78519c-10f7-4f69-aa0f-a443f8c5668e","html_url":"https://github.com/eryue0220/unplugin-stylex","commit_stats":null,"previous_names":["eryue0220/unplugin-stylex"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eryue0220%2Funplugin-stylex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eryue0220%2Funplugin-stylex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eryue0220%2Funplugin-stylex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eryue0220%2Funplugin-stylex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eryue0220","download_url":"https://codeload.github.com/eryue0220/unplugin-stylex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224173345,"owners_count":17268099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:00:48.827Z","updated_at":"2025-04-29T12:32:33.332Z","avatar_url":"https://github.com/eryue0220.png","language":"TypeScript","readme":"# unplugin-stylex \u0026middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/eryue0220/unplugin-stylex/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/unplugin-stylex.svg?style=flat)](https://www.npmjs.com/package/unplugin-stylex)\n\n\u003e [!WARNING]  \n\u003e This plugin is in early development and may not work as expected. Please report any issues you find.\n\n## Installation\n\nInstall the package from the following command\n\n```shell\nnpm install unplugin-stylex --save-dev\n```\n\nor with yarn:\n\n```shell\nyarn add unplugin-stylex --save-dev\n```\n\nor with pnpm:\n\n```shell\npnpm i unplugin-stylex --save-dev\n```\n\n## Configuration\n\n\u003cdetails\u003e\n\u003csummary\u003evite\u003c/summary\u003e\u003cbr\u003e\n\n```js\n// vite.config.js\nimport { defineConfig } from 'vite'\nimport stylexPlugin from 'unplugin-stylex/vite'\n\nexport default defineConfig({\n  plugins: [\n    stylexPlugin({ /* options */}),\n  ],\n})\n```\n\n\u003c/br\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eesbuild\u003c/summary\u003e\u003cbr\u003e\n\n```js\n// esbuild.config.js\nimport { build } from 'esbuild'\nimport stylexPlugin from 'unplugin-stylex/esbuild'\n\nexport default {\n  plugins: [\n    stylexPlugin({ /* options */ }),\n  ],\n}\n```\n\n\u003c/br\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003efarm\u003c/summary\u003e\u003cbr\u003e\n\n```js\n// farm.config.js\nimport { defineConfig } from '@farmfe/core'\nimport stylexPlugin from 'unplugin-stylex/farm'\n\nexport default defineConfig({\n  // other rollup config\n  plugins: [\n    stylexPlugin({ /* options */}),\n  ],\n})\n```\n\n\u003c/br\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003erspack\u003c/summary\u003e\u003cbr\u003e\n\n```js\n// rspack.config.js\nimport stylexPlugin from 'unplugin-stylex/rspack'\n\nmodule.exports = {\n  // other rspack config\n  plugins: [\n    stylexPlugin({ /* options */}),\n  ],\n}\n```\n\n\u003c/br\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003erolldown(⚠️ experimental)\u003c/summary\u003e\u003cbr\u003e\n\n```js\n// rolldown.config.js\nimport stylexRolldownPlugin from 'unplugin-stylex/rolldown'\n\nexport default {\n  // other rolldown config\n  plugins: [\n    stylexRolldownPlugin({ /* options */}),\n  ],\n}\n```\n\n\u003c/br\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003erollup\u003c/summary\u003e\u003cbr\u003e\n\n```js\n// rollup.config.js\nimport stylexRollupPlugin from 'unplugin-stylex/rollup'\n\nexport default {\n  // other rollup config\n  plugins: [\n    stylexRollupPlugin({ /* options */}),\n  ],\n}\n```\n\n\u003c/br\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ewebpack\u003c/summary\u003e\u003cbr\u003e\n\n```js\n// webpack.config.js\nimport stylexWebpackPlugin from 'unplugin-stylex/webpack'\n\nmodule.exports = {\n  // other webpack config\n  plugins: [\n    stylexWebpackPlugin({ /* options */}),\n  ],\n}\n```\n\n\u003c/br\u003e\u003c/details\u003e\n\n## Usage\n\nMore detail usage can check [examples](https://github.com/eryue0220/unplugin-stylex/tree/main/examples)\n\n## Options\n\nCurrent support argument, which may have change in the future\n\n### options.dev\n\n#### options.stylex.runtimeInjection\n\n#### options.stylex.classNamePrefix\n\n#### options.stylex.useCSSLayers\n\n#### options.stylex.babelConfig\n\n#### options.stylex.stylexImports\n\n#### options.stylex.unstable_moduleResolution\n\n# Acknowledgments\n\n- [@stylexjs/rollup-plugin](https://github.com/facebook/stylex/tree/main/packages/rollup-plugin)\n- [vite-plugin-stylex](https://github.com/HorusGoul/vite-plugin-stylex)","funding_links":[],"categories":["Plugins"],"sub_categories":["Unplugin"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feryue0220%2Funplugin-stylex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feryue0220%2Funplugin-stylex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feryue0220%2Funplugin-stylex/lists"}