Closed rebeccadavidsson closed 4 years ago
Had this issue, according to the README it looks like it'll be to do with useCssModules
since you have webpack 4. Try calling the factory method as follows:
import React from 'react';
import FlagIconFactory from 'react-flag-icon-css';
const FlagIcon = FlagIconFactory(React, {useCssModules: false});
Using the code:
The error occurs:
'Could not resolve the styleName flag-icon'.
Versions: yarn v1.22.4, css-loader: version 2.1.1, babel-loader: 8.0.6, file-loader: 3.0.1, style-loader: 1.0.0, webpack: 4.39.1, extract-text-webpack-plugin: ^3.0.2,
Diagnostic output: