createRule(rule) {
        return {
            test: rule.test,
            exclude: this.excludePathsFor(rule.command),
            oneOf: [
                {
                    // Ex: foo.css?module
                    resourceQuery: /module/,
                    use: this.createLoaderList(rule, {
                        mode: 'local',
                        auto: undefined,
                        localIdentName:
                            this.context.config.cssModuleIdentifier || '[hash:base64]'
                    })
                },
                {
                    // Ex: foo.css
                    // Ex: foo.module.css
                    use: this.createLoaderList(rule, {
                        mode: 'local',
                        auto: true,
                        localIdentName:
                            this.context.config.cssModuleIdentifier || '[hash:base64]'
                    })
                }
            ]
        };
    }
Build up the appropriate loaders for the given rule.

@param  {import('webpack').RuleSetRule & {test: RegExp, command: string, type: string}} rule
@returns {import('webpack').RuleSetRule}