SuiteCRM-Core/core/app/shell/webpack.config.js
Clemente Raposo aad193930a Add dynamic module federation to build
- Re-setup karma / jasmine tests
-- Fix tsconfig paths
-- Remove no longer needed view and field test imports
-- Add test app-shell specific test command
-- Add karma/jasmine specific webpack configuration
2021-03-30 19:22:44 +01:00

42 lines
853 B
JavaScript

const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin");
const mf = require("@angular-architects/module-federation/webpack");
const path = require("path");
const sharedMappings = new mf.SharedMappings();
sharedMappings.register(
path.join(__dirname, '../../../tsconfig.json'),
[]);
module.exports = {
output: {
uniqueName: "shell"
},
optimization: {
// Only needed to bypass a temporary bug
runtimeChunk: false
},
module: {
rules: [
{
test: /\.m?js/,
resolve: {
fullySpecified: false
}
}
]
},
plugins: [
new ModuleFederationPlugin({
remotes: {},
shared: {
"@angular/core": {singleton: true},
"@angular/common": {singleton: true},
"@angular/router": {singleton: true},
}
}),
],
};