ssr-plugin-react 6.1.35 → 6.1.39

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
@@ -3,6 +3,41 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.1.39](https://github.com/zhangyuang/ssr/compare/v6.1.38...v6.1.39) (2021-12-31)
7
+
8
+ **Note:** Version bump only for package ssr-plugin-react
9
+
10
+
11
+
12
+
13
+
14
+ ## [6.1.38](https://github.com/zhangyuang/ssr/compare/v6.1.37...v6.1.38) (2021-12-31)
15
+
16
+
17
+ ### Features
18
+
19
+ * better corejsOptions ([732a5ce](https://github.com/zhangyuang/ssr/commit/732a5ce3a60797e4fea564f5994650f9383ef98d))
20
+
21
+
22
+
23
+
24
+
25
+ ## [6.1.37](https://github.com/zhangyuang/ssr/compare/v6.1.36...v6.1.37) (2021-12-30)
26
+
27
+ **Note:** Version bump only for package ssr-plugin-react
28
+
29
+
30
+
31
+
32
+
33
+ ## [6.1.36](https://github.com/zhangyuang/ssr/compare/v6.1.35...v6.1.36) (2021-12-30)
34
+
35
+ **Note:** Version bump only for package ssr-plugin-react
36
+
37
+
38
+
39
+
40
+
6
41
  ## [6.1.35](https://github.com/zhangyuang/ssr/compare/v6.1.34...v6.1.35) (2021-12-30)
7
42
 
8
43
  **Note:** Version bump only for package ssr-plugin-react
@@ -43,20 +43,12 @@ const addBabelLoader = (chain, envOptions) => {
43
43
  };
44
44
  const getBaseConfig = (chain, isServer) => {
45
45
  const config = (0, ssr_server_utils_1.loadConfig)();
46
- const { moduleFileExtensions, useHash, isDev, chainBaseConfig, corejs, babelExtraModule, alias } = config;
46
+ const { moduleFileExtensions, useHash, isDev, chainBaseConfig, corejsOptions, babelExtraModule, alias } = config;
47
47
  const mode = process.env.NODE_ENV;
48
48
  const envOptions = {
49
- modules: false
49
+ modules: false,
50
+ ...corejsOptions
50
51
  };
51
- if (corejs) {
52
- Object.assign(envOptions, {
53
- corejs: {
54
- version: 3,
55
- proposals: true
56
- },
57
- useBuiltIns: 'usage'
58
- });
59
- }
60
52
  chain.mode(mode);
61
53
  chain.module.strictExportPresence(true);
62
54
  chain
@@ -40,20 +40,12 @@ const addBabelLoader = (chain, envOptions) => {
40
40
  };
41
41
  const getBaseConfig = (chain, isServer) => {
42
42
  const config = loadConfig();
43
- const { moduleFileExtensions, useHash, isDev, chainBaseConfig, corejs, babelExtraModule, alias } = config;
43
+ const { moduleFileExtensions, useHash, isDev, chainBaseConfig, corejsOptions, babelExtraModule, alias } = config;
44
44
  const mode = process.env.NODE_ENV;
45
45
  const envOptions = {
46
- modules: false
46
+ modules: false,
47
+ ...corejsOptions
47
48
  };
48
- if (corejs) {
49
- Object.assign(envOptions, {
50
- corejs: {
51
- version: 3,
52
- proposals: true
53
- },
54
- useBuiltIns: 'usage'
55
- });
56
- }
57
49
  chain.mode(mode);
58
50
  chain.module.strictExportPresence(true);
59
51
  chain
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssr-plugin-react",
3
- "version": "6.1.35",
3
+ "version": "6.1.39",
4
4
  "description": "plugin-react for ssr",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -56,10 +56,10 @@
56
56
  "postcss-safe-parser": "4.0.1",
57
57
  "react-dev-utils": "^11.0.4",
58
58
  "serialize-javascript": "^6.0.0",
59
- "ssr-client-utils": "^6.1.29",
60
- "ssr-hoc-react": "^6.1.29",
61
- "ssr-server-utils": "^6.1.35",
62
- "ssr-webpack": "^6.1.35",
59
+ "ssr-client-utils": "^6.1.38",
60
+ "ssr-hoc-react": "^6.1.38",
61
+ "ssr-server-utils": "^6.1.39",
62
+ "ssr-webpack": "^6.1.39",
63
63
  "terser-webpack-plugin": "^2.3.5",
64
64
  "url-loader": "^4.1.1",
65
65
  "vite": "^2.7.0",
@@ -74,7 +74,7 @@
74
74
  "@types/react-dom": "^17.0.0",
75
75
  "@types/react-router-dom": "^5.1.3",
76
76
  "@types/webpack": "^4.41.10",
77
- "ssr-types-react": "^6.1.29"
77
+ "ssr-types-react": "^6.1.38"
78
78
  },
79
- "gitHead": "373b07560c9bcd5767d176b89e38c98261f9fe42"
79
+ "gitHead": "e33119d27d6d0b975f414c3522a2c66fd2f0afbb"
80
80
  }
@@ -45,21 +45,13 @@ const addBabelLoader = (chain: WebpackChain.Rule<WebpackChain.Module>, envOption
45
45
  }
46
46
  const getBaseConfig = (chain: WebpackChain, isServer: boolean) => {
47
47
  const config = loadConfig()
48
- const { moduleFileExtensions, useHash, isDev, chainBaseConfig, corejs, babelExtraModule, alias } = config
48
+ const { moduleFileExtensions, useHash, isDev, chainBaseConfig, corejsOptions, babelExtraModule, alias } = config
49
49
  const mode = process.env.NODE_ENV as Mode
50
50
  const envOptions = {
51
- modules: false
51
+ modules: false,
52
+ ...corejsOptions
52
53
  }
53
54
 
54
- if (corejs) {
55
- Object.assign(envOptions, {
56
- corejs: {
57
- version: 3,
58
- proposals: true
59
- },
60
- useBuiltIns: 'usage'
61
- })
62
- }
63
55
  chain.mode(mode)
64
56
  chain.module.strictExportPresence(true)
65
57
  chain