vite-plugin-small-css-merged-into-js
v1.0.0
Published
Merges css smaller than a specified byte into js
Downloads
129
Maintainers
Readme
Vite plugin 消灭小css、合并css
⭐️ 功能
- 将小于规定字节数的css合并进所依赖的js中
📦 安装
# npm
npm install --save-dev vite-plugin-small-css-merged-into-js
# or yarn
yarn add vite-plugin-small-css-merged-into-js --dev
👨💻 使用
// vite.config.js
import cssToJs from 'vite-plugin-small-css-merged-into-js';
export default {
plugins: [cssToJs()],
};
🛠️ 配置
size
type: number default: 1024 规定字节数
export default {
plugins: [cssToJs(2048)],
};
🤝 贡献
非常欢迎贡献和反馈。
To get it running:
- Clone the project.
npm install
npm run build
📄 License
The MIT License (MIT). Please see License File for more information.