@zohodesk/react-cli 1.1.15 → 1.1.16-exp.10

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -44,6 +44,40 @@ Now to run app
44
44
 
45
45
  # Change Logs
46
46
 
47
+ # 1.1.17 (4-01-2024)
48
+
49
+ **Feature:-**
50
+
51
+ - MJS loader support added.
52
+ - We can enable/disable this feature by `npm run start --enableMjsLoader=true/false` default value will be `false`.
53
+
54
+ ```
55
+ app: {
56
+ enableMjsLoader : true/false
57
+ }
58
+
59
+ ```
60
+
61
+ # 1.1.16 (25-10-2023)
62
+
63
+ **Feature:-**
64
+
65
+ - Support for running devURL in a Kubernetes (k8s) environment has been added.
66
+
67
+ In order to support k8's, we need to the change the server url:-
68
+
69
+ Follow the below steps to enable support for k8's in your app:-
70
+
71
+ 1.Add the following config in your react-cli.config.js file:-
72
+
73
+ ```
74
+ app: {
75
+ server: {
76
+ domain : 'kubernetes'
77
+ }
78
+ }
79
+ ```
80
+
47
81
  # 1.1.15 (11-10-2023)
48
82
 
49
83
  **Feature:-**
@@ -42,7 +42,8 @@ const {
42
42
  sourcemap,
43
43
  crossorigin,
44
44
  postCssPluginOrder,
45
- externals
45
+ externals,
46
+ enableMjsLoader
46
47
  }
47
48
  } = options;
48
49
  const {
@@ -100,7 +101,11 @@ module.exports = {
100
101
 
101
102
  return false;
102
103
  }
103
- }, seperateCssModules ? {
104
+ }, enableMjsLoader ? {
105
+ test: /\.mjs$/,
106
+ include: /node_modules/,
107
+ type: 'javascript/auto'
108
+ } : null, seperateCssModules ? {
104
109
  test: /\.css$/,
105
110
  exclude: /\.module\.css$/,
106
111
  use: (0, _loaderUtils.getCSSLoaders)({
@@ -129,6 +129,10 @@ var _default = {
129
129
  value: '@zohodesk/client_packages_group',
130
130
  cli: 'module_resolve_path'
131
131
  },
132
+ enableMjsLoader: {
133
+ value: false,
134
+ cli: 'enableMjsLoader'
135
+ },
132
136
  customClassNamePrefix: [],
133
137
  // this option only for impact testing
134
138
  devCssFileBountry: {
@@ -5,13 +5,18 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- let getServerURL = (serverInfo, protocol) => {
8
+ const getServerURL = (serverInfo, protocol) => {
9
+ // eslint-disable-next-line prefer-const
9
10
  let {
10
11
  host,
11
12
  domain,
12
13
  port
13
14
  } = serverInfo;
14
15
 
16
+ if (domain === 'kubernetes') {
17
+ return `${protocol ? `${protocol}:` : ''}//${host}`;
18
+ }
19
+
15
20
  if (protocol) {
16
21
  if (protocol === 'ht' + 'tp') {
17
22
  port = Number(port) + 1;
@@ -20,7 +25,7 @@ let getServerURL = (serverInfo, protocol) => {
20
25
  return `${protocol ? `${protocol}:` : ''}//${host}.${domain}.zohocorpin.com:${Number(port) + 1}`;
21
26
  }
22
27
 
23
- return `${protocol ? `${protocol}:` : ''}//${host}:${port}`;
28
+ return `${protocol ? `${protocol}:` : ''}//${host}:${Number(port) + 1}`;
24
29
  }
25
30
  }
26
31
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@zohodesk/react-cli",
3
- "version": "1.1.15",
3
+ "version": "1.1.16-exp.10",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@zohodesk/react-cli",
9
- "version": "1.1.15",
9
+ "version": "1.1.16-exp.10",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@babel/cli": "7.10.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/react-cli",
3
- "version": "1.1.15",
3
+ "version": "1.1.16-exp.10",
4
4
  "description": "A CLI tool for build modern web application and libraries",
5
5
  "scripts": {
6
6
  "init": "node ./lib/utils/init.js",