arui-scripts 11.7.0-feat-webpack5.1 → 11.8.0-feat-webpack5.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/CHANGELOG.md CHANGED
@@ -1,29 +1,6 @@
1
- # [11.7.0-feat-webpack5.1](https://github.com/alfa-laboratory/arui-scripts/compare/v11.6.5...v11.7.0-feat-webpack5.1) (2021-08-02)
1
+ # [11.8.0-feat-webpack5.2](https://github.com/alfa-laboratory/arui-scripts/compare/v11.8.0-feat-webpack5.1...v11.8.0-feat-webpack5.2) (2021-10-21)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * **build:** in webpack5 maybe undefined message ([d942899](https://github.com/alfa-laboratory/arui-scripts/commit/d94289960a761d8543949f3596c6d689fe8a9fc4))
7
- * **configs:** node_env ([18eabca](https://github.com/alfa-laboratory/arui-scripts/commit/18eabca69563a1038ac62725f4366f0350b09b3a))
8
- * **dev-server:** set endline ([1dc6476](https://github.com/alfa-laboratory/arui-scripts/commit/1dc64766ed2b9b63921209e18994b1f980fd444f))
9
- * **hmr:** use run-script-webpack-plugin ([ef1c3bc](https://github.com/alfa-laboratory/arui-scripts/commit/ef1c3bc6f62b260af5582a20a70169355069d3a3))
10
- * **package.json:** add terser-webpack-plugin ([520c3f3](https://github.com/alfa-laboratory/arui-scripts/commit/520c3f3637d43a887878472815cb31d7a5df56d9))
11
- * **webpack.client.dev:** undefined process ([176e180](https://github.com/alfa-laboratory/arui-scripts/commit/176e180d1ac26db678c98c250bc5e648d22abb86))
12
- * **yarn.lock:** retry ([8e91803](https://github.com/alfa-laboratory/arui-scripts/commit/8e91803f315996eb6e0b5c534747ce24770aca5c))
13
- * **yarn.lock:** udpate checksum fsevents ([3a47287](https://github.com/alfa-laboratory/arui-scripts/commit/3a4728780f3c872bc4835800662d2f10272e5ae2))
14
- * **yarn.lock:** update ([50659c6](https://github.com/alfa-laboratory/arui-scripts/commit/50659c65ee84997cefa0168ef6912ace826252c6))
15
-
16
-
17
- ### Features
18
-
19
- * add pnp plugin and remove hmr ([40ec248](https://github.com/alfa-laboratory/arui-scripts/commit/40ec248acfdafce63b16093d7af0c1ef63897370))
20
- * clean code & add pnp-plugin ([899d4b7](https://github.com/alfa-laboratory/arui-scripts/commit/899d4b714c06fbbc0faab86579080cfde2e1726c))
21
- * client webpack plugins ([5f3d5fe](https://github.com/alfa-laboratory/arui-scripts/commit/5f3d5fe077f797f7826e233d16c3b368080854f2))
22
- * **css-minimizer-plugin:** add ([204c743](https://github.com/alfa-laboratory/arui-scripts/commit/204c743b6910d8ca75e60d3163f45f98fe615905))
23
- * **package.json:** update libs ([e7df2e7](https://github.com/alfa-laboratory/arui-scripts/commit/e7df2e77bef2b833e0fc0c6a9eac1edf64f92cdb))
24
- * **webpack:** update ([d3d7a22](https://github.com/alfa-laboratory/arui-scripts/commit/d3d7a2274d2d2c8985d3f3548a913f1fc0f84c48))
25
- * **webpack-dev-server:** update ([33fa3fc](https://github.com/alfa-laboratory/arui-scripts/commit/33fa3fc881951836ee636b9efb91b2ba465bbce2))
26
- * **webpack-dev-server:** update ([3e1590b](https://github.com/alfa-laboratory/arui-scripts/commit/3e1590babea2ad2f4f5a0ecc8370648309daefaf))
27
- * **webpack.client.dev:** add webpack-dev-server to entry ([b3a8bf4](https://github.com/alfa-laboratory/arui-scripts/commit/b3a8bf48d2d234e369756b2476decf3629bafe2c))
28
- * **webpack.client.dev:** update plugins ([77c14d8](https://github.com/alfa-laboratory/arui-scripts/commit/77c14d8b5a99cf8e8d4d43e2d9d0b8534194d87c))
29
- * **yarn:** install packages from sources ([0fe186b](https://github.com/alfa-laboratory/arui-scripts/commit/0fe186b31109c9df53b5586c920efab2fefe0d80))
6
+ * **test:** added new line ([117aa8d](https://github.com/alfa-laboratory/arui-scripts/commit/117aa8d33e28f08b2e720b258be52efd66020d21))
@@ -14,6 +14,8 @@ const getCSSModuleLocalIdent_1 = __importDefault(require("react-dev-utils/getCSS
14
14
  const PnpWebpackPlugin = require('pnp-webpack-plugin');
15
15
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
16
16
  const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
17
+ const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
18
+ const ReactRefreshTypeScript = require('react-refresh-typescript');
17
19
  const app_configs_1 = __importDefault(require("./app-configs"));
18
20
  const babel_client_1 = __importDefault(require("./babel-client"));
19
21
  const postcss_1 = __importDefault(require("./postcss"));
@@ -25,7 +27,6 @@ const cssModuleRegex = /\.module\.css$/;
25
27
  function getSingleEntry(clientEntry) {
26
28
  return [
27
29
  ...(Array.isArray(app_configs_1.default.clientPolyfillsEntry) ? app_configs_1.default.clientPolyfillsEntry : [app_configs_1.default.clientPolyfillsEntry]),
28
- require.resolve('react-hot-loader/patch'),
29
30
  // `${require.resolve('webpack-dev-server/client')}?/`,
30
31
  require.resolve('webpack/hot/dev-server'),
31
32
  // Finally, this is your app's code:
@@ -56,9 +57,6 @@ const webpackClientDev = apply_overrides_1.default(['webpack', 'webpackClient',
56
57
  .replace(/\\/g, '/'),
57
58
  },
58
59
  resolve: {
59
- alias: {
60
- 'react-dom': '@hot-loader/react-dom',
61
- },
62
60
  // This allows you to set a fallback for where Webpack should look for modules.
63
61
  // We placed these paths second because we want `node_modules` to "win"
64
62
  // if there are any conflicts. This matches Node resolution mechanism.
@@ -118,14 +116,14 @@ const webpackClientDev = apply_overrides_1.default(['webpack', 'webpackClient',
118
116
  test: app_configs_1.default.useTscLoader ? /\.(js|jsx|mjs)$/ : /\.(js|jsx|mjs|ts|tsx)$/,
119
117
  include: app_configs_1.default.appSrc,
120
118
  use: [
121
- { loader: require.resolve('react-hot-loader/webpack') },
122
119
  {
123
120
  loader: require.resolve('babel-loader'),
124
121
  options: Object.assign({
125
122
  // This is a feature of `babel-loader` for webpack (not Babel itself).
126
123
  // It enables caching results in ./node_modules/.cache/babel-loader/
127
124
  // directory for faster rebuilds.
128
- cacheDirectory: true
125
+ cacheDirectory: true,
126
+ plugins: require.resolve('react-refresh/babel')
129
127
  }, babel_client_1.default)
130
128
  }
131
129
  ]
@@ -133,19 +131,22 @@ const webpackClientDev = apply_overrides_1.default(['webpack', 'webpackClient',
133
131
  (app_configs_1.default.tsconfig && app_configs_1.default.useTscLoader) && {
134
132
  test: /\.tsx?$/,
135
133
  use: [
136
- { loader: require.resolve('react-hot-loader/webpack') },
137
134
  {
138
135
  loader: require.resolve('babel-loader'),
139
136
  options: Object.assign({
140
137
  // This is a feature of `babel-loader` for webpack (not Babel itself).
141
138
  // It enables caching results in ./node_modules/.cache/babel-loader/
142
139
  // directory for faster rebuilds.
143
- cacheDirectory: true
140
+ cacheDirectory: true,
141
+ plugins: require.resolve('react-refresh/babel')
144
142
  }, babel_client_1.default)
145
143
  },
146
144
  {
147
145
  loader: require.resolve('ts-loader'),
148
146
  options: {
147
+ getCustomTransformers: () => ({
148
+ before: [ReactRefreshTypeScript()],
149
+ }),
149
150
  onlyCompileBundledFiles: true,
150
151
  transpileOnly: true,
151
152
  happyPackMode: true,
@@ -244,6 +245,7 @@ const webpackClientDev = apply_overrides_1.default(['webpack', 'webpackClient',
244
245
  }),
245
246
  // This is necessary to emit hot updates (currently CSS only):
246
247
  new webpack_1.default.HotModuleReplacementPlugin(),
248
+ new ReactRefreshWebpackPlugin(),
247
249
  // Watcher doesn't work well if you mistype casing in a path so we use
248
250
  // a plugin that prints an error when you attempt to do this.
249
251
  // See https://github.com/facebookincubator/create-react-app/issues/240
@@ -12,6 +12,7 @@ server {
12
12
  server_tokens off;
13
13
 
14
14
  location / {
15
+ proxy_set_header Host $host;
15
16
  proxy_pass http://127.0.0.1:${app_configs_1.default.serverPort};
16
17
  }
17
18