@centreon/js-config 25.5.1 → 25.6.0

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/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": "25.5.1",
4
+ "version": "25.6.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"
@@ -6,7 +6,7 @@ const excludeNodeModulesExceptCentreonUi =
6
6
  module.exports = {
7
7
  cache: false,
8
8
  excludeNodeModulesExceptCentreonUi,
9
- getModuleConfiguration: (enableCoverage) => ({
9
+ getModuleConfiguration: (enableCoverage, postCssBase = './') => ({
10
10
  rules: [
11
11
  {
12
12
  exclude: [excludeNodeModulesExceptCentreonUi],
@@ -51,8 +51,22 @@ module.exports = {
51
51
  type: 'asset/resource'
52
52
  },
53
53
  {
54
- test: /\.css$/i,
55
- use: ['style-loader', 'css-loader']
54
+ test: /\.css$/,
55
+ type: 'css/auto',
56
+ use: [
57
+ {
58
+ loader: 'postcss-loader',
59
+ options: {
60
+ postcssOptions: {
61
+ plugins: {
62
+ '@tailwindcss/postcss': {
63
+ base: postCssBase
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ ]
56
70
  }
57
71
  ]
58
72
  }),
@@ -12,10 +12,11 @@ const {
12
12
  const getBaseConfiguration = ({
13
13
  moduleName,
14
14
  moduleFederationConfig,
15
- enableCoverage
15
+ enableCoverage,
16
+ postCssBase
16
17
  }) => ({
17
18
  cache,
18
- module: getModuleConfiguration(enableCoverage),
19
+ module: getModuleConfiguration(enableCoverage, postCssBase),
19
20
  optimization,
20
21
  output: {
21
22
  ...output,
@@ -23,51 +24,55 @@ const getBaseConfiguration = ({
23
24
  library: moduleName,
24
25
  uniqueName: moduleName
25
26
  },
27
+ experiments: {
28
+ css: true
29
+ },
26
30
  plugins: [
27
31
  moduleName &&
28
- new rspack.container.ModuleFederationPlugin({
29
- filename: 'remoteEntry.[chunkhash:8].js',
30
- library: { name: moduleName, type: 'umd' },
31
- name: moduleName,
32
- shared: [
33
- {
34
- '@centreon/ui-context': {
35
- requiredVersion: '1.x',
36
- singleton: true
37
- }
38
- },
39
- {
40
- jotai: {
41
- requiredVersion: '2.x',
42
- singleton: true
43
- }
44
- },
45
- {
46
- 'jotai-suspense': {
47
- singleton: true
48
- }
49
- },
50
- {
51
- react: {
52
- requiredVersion: '19.x',
53
- singleton: true
54
- }
55
- },
56
- {
57
- 'react-i18next': {
58
- requiredVersion: '15.x',
59
- singleton: true
60
- }
61
- },
62
- {
63
- 'react-router': {
64
- requiredVersion: '7.x',
65
- singleton: true
66
- }
32
+ new rspack.container.ModuleFederationPlugin({
33
+ filename: 'remoteEntry.[chunkhash:8].js',
34
+ library: { name: moduleName, type: 'umd' },
35
+ name: moduleName,
36
+ shared: [
37
+ {
38
+ '@centreon/ui-context': {
39
+ requiredVersion: '1.x',
40
+ singleton: true
41
+ }
42
+ },
43
+ {
44
+ jotai: {
45
+ requiredVersion: '2.x',
46
+ singleton: true
47
+ }
48
+ },
49
+ {
50
+ 'jotai-suspense': {
51
+ singleton: true
52
+ }
53
+ },
54
+ {
55
+ react: {
56
+ requiredVersion: '19.x',
57
+ singleton: true
58
+ }
59
+ },
60
+ {
61
+ 'react-i18next': {
62
+ requiredVersion: '15.x',
63
+ singleton: true
64
+ }
65
+ },
66
+ {
67
+ 'react-router': {
68
+ requiredVersion: '7.x',
69
+ singleton: true
67
70
  }
68
- ],
69
- ...moduleFederationConfig
70
- })
71
+ },
72
+ { tailwindcss: { singleton: true, requiredVersion: '4.x' } }
73
+ ],
74
+ ...moduleFederationConfig
75
+ })
71
76
  ].filter(Boolean),
72
77
  resolve: {
73
78
  alias: {