Skip to content

Commit

Permalink
feat: css modules 类名默认开启驼峰转换
Browse files Browse the repository at this point in the history
  • Loading branch information
longgui.wjb committed Jan 17, 2022
1 parent 1e6a13f commit b01f72b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/middleware-webpack/src/config/configModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,15 @@ const addStyleRule = (
.options({
importLoaders: preProcessors?.length ?? 0 + 1,
...options.cssLoader,
modules: {
auto: true,
exportLocalsConvention: "camelCase",
...(typeof options.cssLoader?.modules === "boolean"
? { auto: options.cssLoader?.modules }
: typeof options.cssLoader?.modules === "string"
? { mode: options.cssLoader?.modules }
: options.cssLoader?.modules),
},
})
.end()
// use postcss-loader before css-loader, but after any pre-processor loader
Expand Down

0 comments on commit b01f72b

Please sign in to comment.