@centreon/js-config 23.4.14 → 23.4.15
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 +1 -1
- package/package.json +1 -1
- package/webpack/base/index.js +54 -51
package/jest/index.js
CHANGED
package/package.json
CHANGED
package/webpack/base/index.js
CHANGED
|
@@ -3,6 +3,8 @@ 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
|
+
|
|
6
8
|
const excludeNodeModulesExceptCentreonUi =
|
|
7
9
|
/node_modules(\\|\/)\.pnpm(\\|\/)(?!(@centreon))/;
|
|
8
10
|
|
|
@@ -19,7 +21,7 @@ const getBaseConfiguration = ({
|
|
|
19
21
|
test: /\.[cm]?(j|t)sx?$/
|
|
20
22
|
},
|
|
21
23
|
{
|
|
22
|
-
exclude:
|
|
24
|
+
exclude: excludeAllNodeModules,
|
|
23
25
|
test: /\.[jt]sx?$/,
|
|
24
26
|
use: {
|
|
25
27
|
loader: 'swc-loader',
|
|
@@ -67,57 +69,58 @@ const getBaseConfiguration = ({
|
|
|
67
69
|
},
|
|
68
70
|
plugins: [
|
|
69
71
|
new CleanWebpackPlugin(),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
+
}
|
|
115
119
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
],
|
|
120
|
+
],
|
|
121
|
+
...moduleFederationConfig
|
|
122
|
+
})
|
|
123
|
+
].filter(Boolean),
|
|
121
124
|
resolve: {
|
|
122
125
|
alias: {
|
|
123
126
|
react: path.resolve('./node_modules/react')
|