{"id":21570,"library":"miaoda-sc-plugin","title":"Miaoda SC Plugin","description":"A Vite plugin that generates border-style utility classes (solid, dashed, dotted) with per-side support and responsive variants. Current stable version is 1.0.61, with regular updates. It provides a Tailwind-like API for border styles without requiring the full Tailwind framework, supporting customizable prefixes and responsive breakpoints (sm, md, lg, xl, 2xl). Ships TypeScript types and works with Vite 4, 5, 6, and 7.","status":"active","version":"1.0.61","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","vite","plugin","css","utilities","border","typescript"],"install":[{"cmd":"npm install miaoda-sc-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add miaoda-sc-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add miaoda-sc-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to function as a Vite plugin. It must be installed in the project.","package":"vite","optional":false}],"imports":[{"note":"Default export does not exist; this is a named export.","wrong":"import borderStylePlugin from 'miaoda-sc-plugin'","symbol":"borderStylePlugin","correct":"import { borderStylePlugin } from 'miaoda-sc-plugin'"},{"note":"The plugin only accepts an options object (or no argument), not a boolean.","wrong":"borderStylePlugin(true)","symbol":"borderStylePlugin with options","correct":"borderStylePlugin({ responsive: true, prefix: 'tw-' })"},{"note":"The package is ESM-only and cannot be required with CommonJS in Vite config.","wrong":"const { borderStylePlugin } = require('miaoda-sc-plugin');\nmodule.exports = {\n  plugins: [borderStylePlugin()]\n}","symbol":"Using with defineConfig","correct":"import { defineConfig } from 'vite';\nimport { borderStylePlugin } from 'miaoda-sc-plugin';\n\nexport default defineConfig({\n  plugins: [borderStylePlugin()]\n})"}],"quickstart":{"code":"// vite.config.ts\nimport { defineConfig } from 'vite';\nimport { borderStylePlugin } from 'miaoda-sc-plugin';\n\nexport default defineConfig({\n  plugins: [\n    borderStylePlugin({\n      responsive: true,\n      prefix: ''\n    })\n  ]\n});\n\n// Then in your CSS/HTML use classes like:\n// <div class=\"border-t-solid md:border-b-dashed\"></div>","lang":"typescript","description":"Shows how to install and configure the plugin in a Vite project using TypeScript, enabling responsive variants and custom prefix."},"warnings":[{"fix":"Update imports to use `borderStylePlugin` instead of `borderPlugin`.","message":"Version 1.0.0 changed the export name from `borderPlugin` to `borderStylePlugin`.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Upgrade Vite to version 4, 5, 6, or 7.","message":"Does not work with Vite 3 or earlier; requires Vite ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0.","severity":"broken","affected_versions":">=1.0.0"},{"fix":"Explicitly set a prefix even if empty: `prefix: ''`.","message":"The `prefix` option defaults to empty string. In future versions it may be required to specify a prefix.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Set `responsive: true` in the plugin options.","message":"Responsive variants only work if `responsive: true` is set. Without it, sm:, md: etc. classes are not generated.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `npm install miaoda-sc-plugin@latest` and ensure tsconfig includes 'node_modules/@types' or 'skipLibCheck: false'.","cause":"Missing package installation or type declarations not recognized.","error":"Cannot find module 'miaoda-sc-plugin' or its corresponding type declarations."},{"fix":"Use named import: `import { borderStylePlugin } from 'miaoda-sc-plugin'`.","cause":"Trying to use the plugin without the correct export.","error":"Error: The plugin 'miaoda-sc-plugin' doesn't export a function."},{"fix":"Call `borderStylePlugin({})` or `borderStylePlugin()` (no args) to use defaults.","cause":"Calling the plugin without arguments or with a non-object argument.","error":"TypeError: Cannot destructure property 'responsive' of 'undefined' or 'null'."},{"fix":"Ensure `borderStylePlugin()` is added to the `plugins` array in `vite.config.ts`.","cause":"The plugin is not correctly loaded or configured in vite.config.","error":"[vite:vue] Unknown utility class: border-t-solid"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}