@centreon/js-config 23.4.12-MON-build-npm-packages.31 → 23.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/jest/index.js CHANGED
@@ -21,6 +21,6 @@ module.exports = {
21
21
  ],
22
22
  },
23
23
  transformIgnorePatterns: [
24
- '/node_modules/',
24
+ '/node_modules/(?!centreon-frontend/packages/(centreon-ui|ui-context)).+\\.jsx?$',
25
25
  ],
26
26
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@centreon/js-config",
3
3
  "description": "Centreon Frontend shared build configuration",
4
- "version": "23.4.12-MON-build-npm-packages.31",
4
+ "version": "23.4.13",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"
@@ -3,8 +3,6 @@ const path = require('path');
3
3
  const { CleanWebpackPlugin } = require('clean-webpack-plugin');
4
4
  const { ModuleFederationPlugin } = require('webpack').container;
5
5
 
6
- const excludeAllNodeModules = /node_modules/;
7
-
8
6
  const excludeNodeModulesExceptCentreonUi =
9
7
  /node_modules(\\|\/)\.pnpm(\\|\/)(?!(@centreon))/;
10
8
 
@@ -21,7 +19,7 @@ const getBaseConfiguration = ({
21
19
  test: /\.[cm]?(j|t)sx?$/
22
20
  },
23
21
  {
24
- exclude: excludeAllNodeModules,
22
+ exclude: excludeNodeModulesExceptCentreonUi,
25
23
  test: /\.[jt]sx?$/,
26
24
  use: {
27
25
  loader: 'swc-loader',
@@ -69,58 +67,57 @@ const getBaseConfiguration = ({
69
67
  },
70
68
  plugins: [
71
69
  new CleanWebpackPlugin(),
72
- moduleName &&
73
- new ModuleFederationPlugin({
74
- filename: 'remoteEntry.[chunkhash:8].js',
75
- library: { name: moduleName, type: 'var' },
76
- name: moduleName,
77
- shared: [
78
- {
79
- '@centreon/ui-context': {
80
- requiredVersion: '22.10.0',
81
- singleton: true
82
- }
83
- },
84
- {
85
- jotai: {
86
- requiredVersion: '1.x',
87
- singleton: true
88
- }
89
- },
90
- {
91
- 'jotai-suspense': {
92
- requiredVersion: '0.1.x',
93
- singleton: true
94
- }
95
- },
96
- {
97
- react: {
98
- requiredVersion: '18.x',
99
- singleton: true
100
- }
101
- },
102
- {
103
- 'react-dom': {
104
- requiredVersion: '18.x',
105
- singleton: true
106
- }
107
- },
108
- {
109
- 'react-i18next': {
110
- requiredVersion: '11.x',
111
- singleton: true
112
- }
113
- },
114
- {
115
- 'react-router-dom': {
116
- requiredVersion: '6.x',
117
- singleton: true
118
- }
70
+ new ModuleFederationPlugin({
71
+ filename: 'remoteEntry.[chunkhash:8].js',
72
+ library: { name: moduleName, type: 'var' },
73
+ name: moduleName,
74
+ shared: [
75
+ {
76
+ '@centreon/ui-context': {
77
+ requiredVersion: '22.10.0',
78
+ singleton: true
79
+ }
80
+ },
81
+ {
82
+ jotai: {
83
+ requiredVersion: '1.x',
84
+ singleton: true
85
+ }
86
+ },
87
+ {
88
+ 'jotai-suspense': {
89
+ requiredVersion: '0.1.x',
90
+ singleton: true
119
91
  }
120
- ],
121
- ...moduleFederationConfig
122
- })
123
- ].filter(Boolean),
92
+ },
93
+ {
94
+ react: {
95
+ requiredVersion: '18.x',
96
+ singleton: true
97
+ }
98
+ },
99
+ {
100
+ 'react-dom': {
101
+ requiredVersion: '18.x',
102
+ singleton: true
103
+ }
104
+ },
105
+ {
106
+ 'react-i18next': {
107
+ requiredVersion: '11.x',
108
+ singleton: true
109
+ }
110
+ },
111
+ {
112
+ 'react-router-dom': {
113
+ requiredVersion: '6.x',
114
+ singleton: true
115
+ }
116
+ }
117
+ ],
118
+ ...moduleFederationConfig
119
+ })
120
+ ],
124
121
  resolve: {
125
122
  alias: {
126
123
  react: path.resolve('./node_modules/react')