chore(idp): [OCISDEV-352] remove file-loader from webpack.config.js

Remove file-loader from webpack.config.js to avoid error with new Go version.
The file-loader is also legacy loader from older webpack versions.
Since we are using webpack 5, we don't need it anymore. We are already using
the asset modules instead.
This commit is contained in:
Lukas Hirt committed 2025-10-06 11:50:48 +02:00
1 parent b062fa764e
commit c87727e2f4
1 file changed
-18
-18
View File
@@ -424,25 +424,7 @@ module.exports = function (webpackEnv) {
},
'sass-loader'
)
},
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.
// This loader doesn't use a "test" so it will catch all modules
// that fall through the other loaders.
{
loader: require.resolve('file-loader'),
// Exclude `js` files to keep "css" loader working as it injects
// its runtime that would otherwise be processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
options: {
name: 'static/media/[name].[hash:8].[ext]'
}
}
// ** STOP ** Are you adding a new loader?
// Make sure to add the new loader(s) before the "file" loader.
]
}
]