//const webpack = require('webpack'); const { shareAll, withModuleFederationPlugin } = require('@angular-architects/module-federation/webpack'); const { ModifyEntryPlugin, } = require('@angular-architects/module-federation/src/utils/modify-entry-plugin'); const baseConfig = require('./base-webpack.config'); const webpackConfig = { ...withModuleFederationPlugin({ name: 'fieldcalc', exposes: { './FcCalculatorComponent': './src/app/calculator/calculator-panel.component.ts', }, shared: { "@angular/core": { singleton: true, strictVersion: false, requiredVersion: "auto", }, "@angular/common": { singleton: true, strictVersion: false, requiredVersion: "auto", }, "@angular/forms": { singleton: true, strictVersion: false, requiredVersion: "auto", }, "@angular/common/http": { singleton: true, strictVersion: false, requiredVersion: "auto", }, "@angular/router": { singleton: true, strictVersion: false, requiredVersion: "auto", }, "@ngx-translate/core": { singleton: true, strictVersion: false }, "@angular/localize/init": { singleton: true, eager: true }, 'ol': {singleton: true, requiredVersion: '^7.1.0'}, 'ol-ext': {singleton: true, requiredVersion: '^4.0.3'}, 'ol/layer': { singleton: true, }, 'ol/source': { singleton: true, }, 'hslayers-ng': { singleton: true, }, }, }) } const plugins = webpackConfig.plugins.filter((plugin) => !(plugin instanceof ModifyEntryPlugin)); // // Uncomment for debugging. // console.log('webpackConfig:::', webpackConfig); // console.log('plugins:::', plugins); webpackConfig.resolve.fallback = baseConfig.resolve.fallback; module.exports = { ...webpackConfig, plugins, }; /*module.exports = { devtool: false, plugins: [ new webpack.SourceMapDevToolPlugin({ filename: '[file].map', exclude: ['vendor.js'], }) ], };*/