@machtwatch/react-script 1.2.11-alpha.26 → 1.2.11-alpha.27

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@machtwatch/react-script",
3
- "version": "1.2.11-alpha.26",
3
+ "version": "1.2.11-alpha.27",
4
4
  "description": "Machtwatch React script",
5
5
  "author": "Danny Reza Miloen <danny@machtwatch.co.id>",
6
6
  "contributors": [],
@@ -54,7 +54,7 @@
54
54
  "@pmmmwh/react-refresh-webpack-plugin": "0.6.2",
55
55
  "@svgr/webpack": "^6.2.1",
56
56
  "@testing-library/jest-dom": "^5.12.0",
57
- "@testing-library/react": "^11.2.7",
57
+ "@testing-library/react": "13.0.0",
58
58
  "assets-webpack-plugin": "7.1.1",
59
59
  "autoprefixer": "^10.4.20",
60
60
  "babel-jest": "^26.3.0",
@@ -92,10 +92,13 @@
92
92
  "postcss-import": "^14.1.0",
93
93
  "postcss-loader": "^8.1.1",
94
94
  "postcss-preset-env": "^7.7.1",
95
+ "process": "0.11.10",
95
96
  "promise": "^8.0.2",
96
97
  "purgecss-webpack-plugin": "^4.1.3",
98
+ "react": "18.3.1",
97
99
  "react-dev-utils": "^12.0.1",
98
- "react-error-overlay": "6.0.9",
100
+ "react-dom": "18.3.1",
101
+ "react-error-overlay": "6.0.11",
99
102
  "react-refresh": "0.18.0",
100
103
  "recluster": "^0.4.5",
101
104
  "regenerator-runtime": "^0.13.3",
@@ -10,38 +10,38 @@ const {
10
10
  stopReportingRuntimeErrors,
11
11
  } = require('react-error-overlay');
12
12
 
13
- setEditorHandler(errorLocation => {
14
- const fileName = encodeURIComponent(errorLocation.fileName);
15
- const lineNumber = encodeURIComponent(errorLocation.lineNumber || 1);
13
+ // setEditorHandler(errorLocation => {
14
+ // const fileName = encodeURIComponent(errorLocation.fileName);
15
+ // const lineNumber = encodeURIComponent(errorLocation.lineNumber || 1);
16
+ //
17
+ // fetch(
18
+ // // Keep in sync with react-dev-utils/errorOverlayMiddleware
19
+ // `${launchEditorEndpoint}?fileName=${fileName}&lineNumber=${lineNumber}`,
20
+ // );
21
+ // });
16
22
 
17
- fetch(
18
- // Keep in sync with react-dev-utils/errorOverlayMiddleware
19
- `${launchEditorEndpoint}?fileName=${fileName}&lineNumber=${lineNumber}`,
20
- );
21
- });
22
-
23
- hotClient.useCustomOverlay({
24
- showProblems(type, errors) {
25
- const formatted = formatWebpackMessages({
26
- errors,
27
- warnings: [],
28
- });
29
-
30
- reportBuildError(formatted.errors[0]);
31
- },
32
- clear() {
33
- dismissBuildError();
34
- },
35
- });
23
+ // hotClient.useCustomOverlay({
24
+ // showProblems(type, errors) {
25
+ // const formatted = formatWebpackMessages({
26
+ // errors,
27
+ // warnings: [],
28
+ // });
29
+ //
30
+ // reportBuildError(formatted.errors[0]);
31
+ // },
32
+ // clear() {
33
+ // dismissBuildError();
34
+ // },
35
+ // });
36
36
 
37
37
  hotClient.setOptionsAndConnect({
38
38
  name: 'client',
39
39
  reload: true,
40
40
  });
41
41
 
42
- startReportingRuntimeErrors({
43
- filename: '/assets/client.js',
44
- });
42
+ // startReportingRuntimeErrors({
43
+ // filename: '/assets/client.js',
44
+ // });
45
45
 
46
46
  if (module.hot) {
47
47
  module.hot.dispose(stopReportingRuntimeErrors);
@@ -168,9 +168,12 @@ const webpackConfig = ({ isClient }) => ({
168
168
  '@hooks': path.resolve(paths.appSrc, 'hooks'),
169
169
  '@components': path.resolve(paths.appSrc, 'components'),
170
170
  '@baseComponents': path.resolve(paths.appSrc, 'base_components'),
171
- 'react/jsx-dev-runtime': 'react/jsx-dev-runtime.js',
172
- 'react/jsx-runtime': 'react/jsx-runtime.js'
171
+ 'react/jsx-runtime': require.resolve('react/jsx-runtime'),
172
+ 'react/jsx-dev-runtime': require.resolve('react/jsx-dev-runtime'),
173
+ 'react/jsx-runtime.js': require.resolve('react/jsx-runtime'),
174
+ 'react/jsx-dev-runtime.js': require.resolve('react/jsx-dev-runtime'),
173
175
  },
176
+ conditionNames: ['import', 'require', 'node', 'default'],
174
177
  },
175
178
 
176
179
  resolveLoader: {
@@ -209,6 +212,9 @@ const webpackConfig = ({ isClient }) => ({
209
212
  test: /\.mjs$/,
210
213
  include: /node_modules/,
211
214
  type: 'javascript/auto',
215
+ resolve: {
216
+ fullySpecified: false,
217
+ }
212
218
  },
213
219
  {
214
220
  test: /\.(woff|woff2|eot|ttf|otf)$/i,
@@ -573,6 +579,9 @@ const clientConfig = {
573
579
  'process.env.BROWSER': true,
574
580
  __DEVTOOLS__: isVerbose // <-------- DISABLE redux-devtools HERE
575
581
  }),
582
+ new webpack.ProvidePlugin({
583
+ process: 'process/browser.js',
584
+ }),
576
585
 
577
586
  new MiniCssExtractPlugin({
578
587
  // Options similar to the same options in webpackOptions.output