Kaynağa Gözat

🚨 (don't) resolve "fs" and "path" modules

jmacura 2 yıl önce
ebeveyn
işleme
9cee4991f7
1 değiştirilmiş dosya ile 10 ekleme ve 7 silme
  1. 10 7
      custom-webpack.config.js

+ 10 - 7
custom-webpack.config.js

@@ -1,13 +1,11 @@
 //const webpack = require('webpack');
 const { shareAll, withModuleFederationPlugin } = require('@angular-architects/module-federation/webpack');
 
-module.exports = withModuleFederationPlugin({
+const withModuleFederationConfig = withModuleFederationPlugin({
   name: 'fieldcalc',
-
   exposes: {
     './FcCalculatorComponent': './src/app/calculator/calculator-panel.component.ts',
   },
-
   shared: {
     "@angular/core": {
       singleton: true,
@@ -49,12 +47,17 @@ module.exports = withModuleFederationPlugin({
     'hslayers-ng': {
       singleton: true,
       strictVersion: true,
-      requiredVersion: '^10.0.0',
-      version: '10.0.0'
+      requiredVersion: '^11.0.0',
+      version: '11.0.0'
     },
-  }
+  },
+});
+withModuleFederationConfig.resolve.fallback = {
+  "path": false,
+  "fs": false
+};
+module.exports = withModuleFederationConfig;
 
-})
 /*module.exports = {
   devtool: false,
   plugins: [