auto-css-module

0.1.0 • Public • Published

auto-css-module

It enables css-module in Babel, Vite automatically

// You code
import style from 'style.css'

// Vite
import style from 'style.css?.module.css'

// Babel
import style from 'style.css?modules'

Install

npm i auto-css-module -D

Usage

  • Vite
import autoCssModule from 'auto-css-module/vite'

export default {
  plugins: [
    autoCssModule(/* options */)
  ]
}
  • Babel
module.exports = {
  plugins: [
    ['auto-css-module/babel', /* options */],
  ],
}

Package Sidebar

Install

npm i auto-css-module

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

12.4 kB

Total Files

20

Last publish

Collaborators

  • caoxie