@centreon/js-config 23.10.47 → 23.10.48
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/cypress/component/commands.tsx +20 -6
- package/cypress/component/configuration.js +11 -9
- package/cypress/component/disableCssTransitions.ts +19 -0
- package/cypress/component/enableVisualTesting.ts +1 -1
- package/cypress/e2e/commands/monitoring.ts +75 -0
- package/cypress/e2e/commands.ts +202 -32
- package/cypress/e2e/configuration.ts +30 -32
- package/cypress/e2e/esbuild-preprocessor.ts +26 -0
- package/cypress/e2e/plugins.ts +21 -119
- package/cypress/e2e/reporter-config.js +13 -0
- package/cypress/e2e/tasks.ts +105 -0
- package/eslint/base.typescript.eslintrc.js +15 -3
- package/eslint/lambda/typescript.eslintrc.js +48 -0
- package/jest/index.js +5 -1
- package/jest/lambda/typescript.js +49 -0
- package/package.json +18 -5
- package/tsconfig/index.json +5 -4
- package/tsconfig/lambda/tsconfig.json +14 -0
- package/webpack/base/globalConfig.js +71 -0
- package/webpack/base/index.js +14 -57
package/webpack/base/index.js
CHANGED
|
@@ -3,68 +3,22 @@ const path = require('path');
|
|
|
3
3
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
4
4
|
const { ModuleFederationPlugin } = require('webpack').container;
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const {
|
|
7
|
+
getModuleConfiguration,
|
|
8
|
+
optimization,
|
|
9
|
+
output,
|
|
10
|
+
cache
|
|
11
|
+
} = require('./globalConfig');
|
|
8
12
|
|
|
9
13
|
const getBaseConfiguration = ({
|
|
10
14
|
moduleName,
|
|
11
15
|
moduleFederationConfig,
|
|
12
16
|
jscTransformConfiguration
|
|
13
17
|
}) => ({
|
|
14
|
-
cache
|
|
15
|
-
module:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
parser: { system: false },
|
|
19
|
-
test: /\.[cm]?(j|t)sx?$/
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
exclude: excludeNodeModulesExceptCentreonUi,
|
|
23
|
-
test: /\.[jt]sx?$/,
|
|
24
|
-
use: {
|
|
25
|
-
loader: 'swc-loader',
|
|
26
|
-
options: {
|
|
27
|
-
jsc: {
|
|
28
|
-
parser: {
|
|
29
|
-
syntax: 'typescript',
|
|
30
|
-
tsx: true
|
|
31
|
-
},
|
|
32
|
-
transform: jscTransformConfiguration
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
test: /\.icon.svg$/,
|
|
39
|
-
use: ['@svgr/webpack']
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
exclude: excludeNodeModulesExceptCentreonUi,
|
|
43
|
-
test: /\.(bmp|png|jpg|jpeg|gif|svg)$/,
|
|
44
|
-
use: [
|
|
45
|
-
{
|
|
46
|
-
loader: 'url-loader',
|
|
47
|
-
options: {
|
|
48
|
-
limit: 10000,
|
|
49
|
-
name: '[name].[hash:8].[ext]'
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
optimization: {
|
|
57
|
-
splitChunks: {
|
|
58
|
-
chunks: 'all',
|
|
59
|
-
maxSize: 400 * 1024
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
output: {
|
|
63
|
-
chunkFilename: '[name].[chunkhash:8].chunk.js',
|
|
64
|
-
filename: '[name].[chunkhash:8].js',
|
|
65
|
-
libraryTarget: 'umd',
|
|
66
|
-
umdNamedDefine: true
|
|
67
|
-
},
|
|
18
|
+
cache,
|
|
19
|
+
module: getModuleConfiguration(jscTransformConfiguration),
|
|
20
|
+
optimization,
|
|
21
|
+
output,
|
|
68
22
|
plugins: [
|
|
69
23
|
new CleanWebpackPlugin(),
|
|
70
24
|
moduleName &&
|
|
@@ -121,7 +75,10 @@ const getBaseConfiguration = ({
|
|
|
121
75
|
].filter(Boolean),
|
|
122
76
|
resolve: {
|
|
123
77
|
alias: {
|
|
124
|
-
react: path.resolve('./node_modules/react')
|
|
78
|
+
react: path.resolve('./node_modules/react'),
|
|
79
|
+
'@centreon/ui/fonts': path.resolve(
|
|
80
|
+
'./node_modules/@centreon/ui/public/fonts'
|
|
81
|
+
)
|
|
125
82
|
},
|
|
126
83
|
extensions: ['.js', '.jsx', '.ts', '.tsx']
|
|
127
84
|
}
|