ssr-plugin-react 6.1.34 → 6.1.38

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.38](https://github.com/zhangyuang/ssr/compare/v6.1.37...v6.1.38) (2021-12-31)
7
+
8
+
9
+ ### Features
10
+
11
+ * better corejsOptions ([732a5ce](https://github.com/zhangyuang/ssr/commit/732a5ce3a60797e4fea564f5994650f9383ef98d))
12
+
13
+
14
+
15
+
16
+
17
+ ## [6.1.37](https://github.com/zhangyuang/ssr/compare/v6.1.36...v6.1.37) (2021-12-30)
18
+
19
+ **Note:** Version bump only for package ssr-plugin-react
20
+
21
+
22
+
23
+
24
+
25
+ ## [6.1.36](https://github.com/zhangyuang/ssr/compare/v6.1.35...v6.1.36) (2021-12-30)
26
+
27
+ **Note:** Version bump only for package ssr-plugin-react
28
+
29
+
30
+
31
+
32
+
33
+ ## [6.1.35](https://github.com/zhangyuang/ssr/compare/v6.1.34...v6.1.35) (2021-12-30)
34
+
35
+ **Note:** Version bump only for package ssr-plugin-react
36
+
37
+
38
+
39
+
40
+
6
41
  ## [6.1.34](https://github.com/zhangyuang/ssr/compare/v6.1.33...v6.1.34) (2021-12-29)
7
42
 
8
43
 
@@ -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.34",
3
+ "version": "6.1.38",
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.34",
62
- "ssr-webpack": "^6.1.34",
59
+ "ssr-client-utils": "^6.1.38",
60
+ "ssr-hoc-react": "^6.1.38",
61
+ "ssr-server-utils": "^6.1.38",
62
+ "ssr-webpack": "^6.1.38",
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": "c5e98b87d6ca0479466ae352b8beaf3fa0dd30b6"
79
+ "gitHead": "f5d08ca254370d85cc17914d940187b4b06b2a4a"
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