@centreon/js-config 23.10.2-AT-94-pipeline-scan.0 → 23.10.2
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/configuration.js +2 -2
- package/jest/index.js +4 -0
- package/package.json +1 -1
- package/webpack/base/index.js +11 -1
|
@@ -4,13 +4,13 @@ const {
|
|
|
4
4
|
addMatchImageSnapshotPlugin
|
|
5
5
|
} = require('@simonsmith/cypress-image-snapshot/plugin');
|
|
6
6
|
|
|
7
|
-
module.exports = ({ webpackConfig, cypressFolder, specPattern, env }) => {
|
|
7
|
+
module.exports = ({ webpackConfig, cypressFolder, specPattern, env, useVite = false }) => {
|
|
8
8
|
const mainCypressFolder = cypressFolder || 'cypress';
|
|
9
9
|
|
|
10
10
|
return defineConfig({
|
|
11
11
|
component: {
|
|
12
12
|
devServer: {
|
|
13
|
-
bundler: 'webpack',
|
|
13
|
+
bundler: useVite ? 'vite' : 'webpack',
|
|
14
14
|
framework: 'react',
|
|
15
15
|
webpackConfig
|
|
16
16
|
},
|
package/jest/index.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
moduleNameMapper: {
|
|
3
3
|
'\\.(s?css|png|svg|jpg)$': 'identity-obj-proxy',
|
|
4
|
+
'^.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$':
|
|
5
|
+
'jest-transform-stub',
|
|
4
6
|
'^react($|/.+)': '<rootDir>/node_modules/react$1'
|
|
5
7
|
},
|
|
6
8
|
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
|
|
7
9
|
testEnvironment: 'jsdom',
|
|
8
10
|
testPathIgnorePatterns: ['/node_modules/', '!*.cypress.spec.tsx'],
|
|
9
11
|
transform: {
|
|
12
|
+
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$':
|
|
13
|
+
'jest-transform-stub',
|
|
10
14
|
'^.+\\.[jt]sx?$': [
|
|
11
15
|
'@swc/jest',
|
|
12
16
|
{
|
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.10.2
|
|
4
|
+
"version": "23.10.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/centreon/centreon-frontend.git"
|
package/webpack/base/index.js
CHANGED
|
@@ -50,6 +50,13 @@ const getBaseConfiguration = ({
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
generator: {
|
|
56
|
+
filename: '[name][ext]'
|
|
57
|
+
},
|
|
58
|
+
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
|
59
|
+
type: 'asset/resource'
|
|
53
60
|
}
|
|
54
61
|
]
|
|
55
62
|
},
|
|
@@ -121,7 +128,10 @@ const getBaseConfiguration = ({
|
|
|
121
128
|
].filter(Boolean),
|
|
122
129
|
resolve: {
|
|
123
130
|
alias: {
|
|
124
|
-
react: path.resolve('./node_modules/react')
|
|
131
|
+
react: path.resolve('./node_modules/react'),
|
|
132
|
+
'@centreon/ui/fonts': path.resolve(
|
|
133
|
+
'./node_modules/@centreon/ui/public/fonts'
|
|
134
|
+
)
|
|
125
135
|
},
|
|
126
136
|
extensions: ['.js', '.jsx', '.ts', '.tsx']
|
|
127
137
|
}
|