Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

配置css-loader时,提示"options has an unknown property 'localIdentName'. These properties are valid" #1

Open
Kylin93CN opened this issue Jun 12, 2020 · 0 comments

Comments

@Kylin93CN
Copy link
Owner

webpack配置css-loader时,配置了camelCase: true或者localIdentName: '[name]__[local]___[hash:base64:5]',时,就会报错,说属性是无效的。
版本"css-loader": "^3.5.3"

webpack中文网所述如下:
image

webpack官网所述如下:
image

还是要对比官网的文档来看。

css-loader配置

...
{
            loader: 'css-loader',
            options: {
              importLoaders: 2,
              modules: {
                localIdentName: '[name]__[local]___[hash:base64:5]',
              },
              sourceMap: true,
              localsConvention: 'camelCase',
            },
},
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant