Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/babel-plugins/babel-plugin-umi-css-modules
处理样式文件引入路径,添加?cssModules
https://github.com/babel-plugins/babel-plugin-umi-css-modules
babel babel-plugin css-modules umi
Last synced: 23 days ago
JSON representation
处理样式文件引入路径,添加?cssModules
- Host: GitHub
- URL: https://github.com/babel-plugins/babel-plugin-umi-css-modules
- Owner: babel-plugins
- License: mit
- Created: 2019-09-06T08:49:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T01:14:27.000Z (about 2 years ago)
- Last Synced: 2024-12-14T20:12:00.110Z (27 days ago)
- Topics: babel, babel-plugin, css-modules, umi
- Language: TypeScript
- Homepage:
- Size: 551 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
babel-plugin-umi-css-modules
[![NPM version](https://img.shields.io/npm/v/@babel-plugins/umi-css-modules.svg?style=flat)](https://npmjs.org/package/@babel-plugins/umi-css-modules)
[![NPM downloads](http://img.shields.io/npm/dm/@babel-plugins/umi-css-modules.svg?style=flat)](https://npmjs.org/package/@babel-plugins/umi-css-modules)## 项目由来
umi通用解决方案 [issue](https://github.com/umijs/umi/issues/1417)
**主要功能**
```
// Input:
import styles from './a.css';
import './b.css';// Output:
import styles from './a.css?cssModules';
import './b.css';
```## 安装
```
// npm
npm install --save-dev @babel-plugins/umi-css-modules// yarn
yarn add --dev @babel-plugins/umi-css-modules
```## 使用
添加插件到你的babel配置文件中
```
{
"plugins": [
["@babel-plugins/umi-css-modules"]
]
}
```