Skip to content

Commit 0915b1d

Browse files
committed
mod: improve css class name convertion
- can convert `block--element` to `blockElement` - can convert `block__color` to `blockColor`
1 parent 6deb8ef commit 0915b1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default {
5454
}),
5555
nodeResolve(),
5656
postcss({
57-
namedExports: (name) => name.replace(/-([a-z])/g, (match, letter) => letter.toUpperCase()),
57+
namedExports: (name) => name.replace(/[-_]+([a-z])/g, (match, letter) => letter.toUpperCase()),
5858
plugins: [autoprefixer(), cssnano()],
5959
modules: true,
6060
extract: true,

0 commit comments

Comments
 (0)