| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- //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 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 = {
- "path": false,
- "fs": false
- };
- module.exports = {
- ...webpackConfig,
- plugins,
- };
- /*module.exports = {
- devtool: false,
- plugins: [
- new webpack.SourceMapDevToolPlugin({
- filename: '[file].map',
- exclude: ['vendor.js'],
- })
- ],
- };*/
|