Registry / web-framework / miaoda-sc-plugin

miaoda-sc-plugin

JSON →
library1.0.61jsnpmunverified

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.

npm install miaoda-sc-plugin
INSTALL
IMPORT
SIG · MIAODA-SC-PLUGIN
M
miaoda-sc-plugin
web-frameworkjavascriptv1.0.61
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

borderStylePlugin
import { borderStylePlugin } from 'miaoda-sc-plugin'
import borderStylePlugin from 'miaoda-sc-plugin'
Default export does not exist; this is a named export.
borderStylePlugin with options
borderStylePlugin({ responsive: true, prefix: 'tw-' })
borderStylePlugin(true)
The plugin only accepts an options object (or no argument), not a boolean.
Using with defineConfig
import { defineConfig } from 'vite'; import { borderStylePlugin } from 'miaoda-sc-plugin'; export default defineConfig({ plugins: [borderStylePlugin()] })
const { borderStylePlugin } = require('miaoda-sc-plugin'); module.exports = { plugins: [borderStylePlugin()] }
The package is ESM-only and cannot be required with CommonJS in Vite config.

Shows how to install and configure the plugin in a Vite project using TypeScript, enabling responsive variants and custom prefix.

// vite.config.ts import { defineConfig } from 'vite'; import { borderStylePlugin } from 'miaoda-sc-plugin'; export default defineConfig({ plugins: [ borderStylePlugin({ responsive: true, prefix: '' }) ] }); // Then in your CSS/HTML use classes like: // <div class="border-t-solid md:border-b-dashed"></div>
Debug
Known issues
breakingVersion 1.0.0 changed the export name from `borderPlugin` to `borderStylePlugin`.
fix
Update imports to use `borderStylePlugin` instead of `borderPlugin`.
affects: <1.0.0
brokenDoes not work with Vite 3 or earlier; requires Vite ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0.
fix
Upgrade Vite to version 4, 5, 6, or 7.
affects: >=1.0.0
deprecatedThe `prefix` option defaults to empty string. In future versions it may be required to specify a prefix.
fix
Explicitly set a prefix even if empty: `prefix: ''`.
affects: >=1.0.0
gotchaResponsive variants only work if `responsive: true` is set. Without it, sm:, md: etc. classes are not generated.
fix
Set `responsive: true` in the plugin options.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'miaoda-sc-plugin' or its corresponding type declarations.
Missing package installation or type declarations not recognized.
fix
Run `npm install miaoda-sc-plugin@latest` and ensure tsconfig includes 'node_modules/@types' or 'skipLibCheck: false'.
Error: The plugin 'miaoda-sc-plugin' doesn't export a function.
Trying to use the plugin without the correct export.
fix
Use named import: `import { borderStylePlugin } from 'miaoda-sc-plugin'`.
TypeError: Cannot destructure property 'responsive' of 'undefined' or 'null'.
Calling the plugin without arguments or with a non-object argument.
fix
Call `borderStylePlugin({})` or `borderStylePlugin()` (no args) to use defaults.
[vite:vue] Unknown utility class: border-t-solid
The plugin is not correctly loaded or configured in vite.config.
fix
Ensure `borderStylePlugin()` is added to the `plugins` array in `vite.config.ts`.
Upgrade
Version history
1.0.61latest on npm
Audit
Dependencies
viterequiredRequired to function as a Vite plugin. It must be installed in the project.
Agent activity
2 hits · last 30 days
node
2
Resources
miaoda-sc-plugin — npm install miaoda-sc-plugin · libregistry