I have used resolveExtensions in webpack config as follows.
const commonOpts = {
isExternalEnv: true,
outputPath: 'dist/production/www',
resolveExtensions: ['.js', '.ts', '.json', '.jsx', '.scss']
}
It is working fine for normal components.
As i am using module federation concepts in project. So i am exposing components like below for which resolveExtensions configuration is not working.
const commonOpts = {
isExternalEnv: true,
outputPath: 'dist/production/www',
resolveExtensions: ['.js', '.ts', '.json', '.jsx', '.scss'],
module: {
rules: [
{
test: /\.(sa|sc|c)ss$/,
use: [
{
loader: 'sass-resources-loader',
options: {
resources: require('./src/styles/common/index.js'),
},
},
],
},
],
},
moduleFederationOpts: {
name: 'MyApp',
filename: 'js/my-app-entry.js',
exposes: {
'./myapp': './src/app.js',
'./myAppBlock': './src/modules/blocks/myBlock.js',
},
},
}
How can we apply resolveExtensions configuration to exposed components?