I started a small project in react + webpack in which I tried to use the components proposed by Semantic UI, here, I set up a small search form which contains an icon proposed by Semantic UI, but at the time of the build of my application, the icon does not load and the error message below appears:
after several searches I modified the .gitattributes file :
I also modified the webpack file:
const path = require('path');
const webpack = require('webpack');
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const port = 8080;
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
module: {
rules: [
// Styles for SCSS files
{
test: /.(scss)$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 2,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
},
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
implementation: require('sass'),
},
},
],
},
// Styles for CSS files
{
test: /.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
sourceMap: true,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
},
},
],
},
// Fonts and assets
{
test: /.(woff|woff2|eot|ttf|otf)$/,
type: 'asset/resource',
},
],
},
devServer: {
historyApiFallback: true,
static: path.resolve(__dirname, '../dist'),
static: {
watch: {
ignored: /node_modules/,
},
},
open: true,
compress: true,
hot: true,
port,
},
});
The problem persists in spite of everything. Any ideas? ^^