|
|
@@ -1,7 +1,12 @@
|
|
|
//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 withModuleFederationConfig = withModuleFederationPlugin({
|
|
|
+const webpackConfig = {
|
|
|
+ ...withModuleFederationPlugin({
|
|
|
name: 'fieldcalc',
|
|
|
exposes: {
|
|
|
'./FcCalculatorComponent': './src/app/calculator/calculator-panel.component.ts',
|
|
|
@@ -35,6 +40,7 @@ const withModuleFederationConfig = withModuleFederationPlugin({
|
|
|
"@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'},
|
|
|
@@ -46,17 +52,26 @@ const withModuleFederationConfig = withModuleFederationPlugin({
|
|
|
},
|
|
|
'hslayers-ng': {
|
|
|
singleton: true,
|
|
|
- strictVersion: true,
|
|
|
- requiredVersion: '^11.0.0',
|
|
|
- version: '11.0.0'
|
|
|
},
|
|
|
},
|
|
|
-});
|
|
|
-withModuleFederationConfig.resolve.fallback = {
|
|
|
- "path": false,
|
|
|
- "fs": false
|
|
|
+})
|
|
|
+}
|
|
|
+
|
|
|
+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 = withModuleFederationConfig;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/*module.exports = {
|
|
|
devtool: false,
|