Skip to content

Commit

Permalink
feat: css modules
Browse files Browse the repository at this point in the history
  • Loading branch information
FE-Sadhu committed Apr 25, 2021
1 parent 26547b0 commit e68f2f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ module.exports = {
test: /\.css$/i,
use: [
isDev ? 'style-loader' : MiniCssExtractPlugin.loader, // 开发环境不需要分割 css
'css-loader',
{
loader: 'css-loader',
options: {
modules: {
localIdentName: isDev ? '[path][name]__[local]--[hash:base64:5]' : '[hash:base64]',
},
},
},
{
loader: 'postcss-loader',
options: {
Expand Down

0 comments on commit e68f2f9

Please sign in to comment.