Skip to content

Commit

Permalink
separate handling of stripes-components and application icons
Browse files Browse the repository at this point in the history
Icons in stripes-components are imported as components whereas those in
applications are just resources, so we need to load them differently.
  • Loading branch information
zburke committed Dec 4, 2024
1 parent 42cac16 commit 12613ed
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions webpack.config.federate.remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,24 @@ const buildConfig = (metadata) => {
filename: './img/[name].[contenthash].[ext]',
},
},
// {
// test: /\.svg$/,
// use: [{
// loader: 'url-loader',
// options: {
// esModule: false,
// },
// }]
// },
{
test: /\.svg$/,
use: [{
loader: 'url-loader',
options: {
esModule: false,
},
}]
type: 'asset/inline',
resourceQuery: { not: /icon/ } // exclude built-in icons from stripes-components which are loaded as react components.
},
{
test: /\.svg$/,
resourceQuery: /icon/, // stcom icons use this query on the resource.
use: ['@svgr/webpack']
},
{
test: /\.js.map$/,
Expand Down

0 comments on commit 12613ed

Please sign in to comment.