ssr-plugin-react 6.1.70 → 6.1.74
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 +27 -0
- package/cjs/tools/vite.js +2 -1
- package/esm/tools/vite.js +2 -1
- package/package.json +7 -7
- package/src/tools/vite.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.74](https://github.com/zhangyuang/ssr/compare/v6.1.73...v6.1.74) (2022-03-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package ssr-plugin-react
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [6.1.73](https://github.com/zhangyuang/ssr/compare/v6.1.72...v6.1.73) (2022-03-16)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package ssr-plugin-react
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [6.1.71](https://github.com/zhangyuang/ssr/compare/v6.1.70...v6.1.71) (2022-03-16)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* support base config ([6c3cb6e](https://github.com/zhangyuang/ssr/commit/6c3cb6e58ce21dc81c0e7690c9652e8445e0b693))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [6.1.70](https://github.com/zhangyuang/ssr/compare/v6.1.68...v6.1.70) (2022-03-15)
|
|
7
34
|
|
|
8
35
|
|
package/cjs/tools/vite.js
CHANGED
|
@@ -6,7 +6,7 @@ const vite_1 = require("vite");
|
|
|
6
6
|
const ssr_server_utils_1 = require("ssr-server-utils");
|
|
7
7
|
const plugin_react_1 = require("@vitejs/plugin-react");
|
|
8
8
|
const vite_plugin_style_import_1 = require("vite-plugin-style-import");
|
|
9
|
-
const { getOutput, reactServerEntry, reactClientEntry, viteConfig, supportOptinalChaining, isDev, define, babelOptions } = (0, ssr_server_utils_1.loadConfig)();
|
|
9
|
+
const { getOutput, prefix, reactServerEntry, reactClientEntry, viteConfig, supportOptinalChaining, isDev, define, babelOptions } = (0, ssr_server_utils_1.loadConfig)();
|
|
10
10
|
const { clientOutPut, serverOutPut } = getOutput();
|
|
11
11
|
const styleImportConfig = {
|
|
12
12
|
include: ['**/*.vue', '**/*.ts', '**/*.js', '**/*.tsx', '**/*.jsx', /chunkName/],
|
|
@@ -58,6 +58,7 @@ const serverConfig = {
|
|
|
58
58
|
exports.serverConfig = serverConfig;
|
|
59
59
|
const clientConfig = {
|
|
60
60
|
...(0, ssr_server_utils_1.commonConfig)(),
|
|
61
|
+
base: isDev ? '/' : prefix,
|
|
61
62
|
esbuild: {
|
|
62
63
|
keepNames: true
|
|
63
64
|
},
|
package/esm/tools/vite.js
CHANGED
|
@@ -3,7 +3,7 @@ import { build } from 'vite';
|
|
|
3
3
|
import { loadConfig, chunkNamePlugin, rollupOutputOptions, manifestPlugin, commonConfig, asyncOptimizeChunkPlugin } from 'ssr-server-utils';
|
|
4
4
|
import react from '@vitejs/plugin-react';
|
|
5
5
|
import styleImport, { AndDesignVueResolve, VantResolve, ElementPlusResolve, NutuiResolve, AntdResolve } from 'vite-plugin-style-import';
|
|
6
|
-
const { getOutput, reactServerEntry, reactClientEntry, viteConfig, supportOptinalChaining, isDev, define, babelOptions } = loadConfig();
|
|
6
|
+
const { getOutput, prefix, reactServerEntry, reactClientEntry, viteConfig, supportOptinalChaining, isDev, define, babelOptions } = loadConfig();
|
|
7
7
|
const { clientOutPut, serverOutPut } = getOutput();
|
|
8
8
|
const styleImportConfig = {
|
|
9
9
|
include: ['**/*.vue', '**/*.ts', '**/*.js', '**/*.tsx', '**/*.jsx', /chunkName/],
|
|
@@ -54,6 +54,7 @@ const serverConfig = {
|
|
|
54
54
|
};
|
|
55
55
|
const clientConfig = {
|
|
56
56
|
...commonConfig(),
|
|
57
|
+
base: isDev ? '/' : prefix,
|
|
57
58
|
esbuild: {
|
|
58
59
|
keepNames: true
|
|
59
60
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ssr-plugin-react",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.74",
|
|
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": "^6.0.0",
|
|
57
57
|
"react-dev-utils": "^11.0.4",
|
|
58
58
|
"serialize-javascript": "^6.0.0",
|
|
59
|
-
"ssr-client-utils": "^6.1.
|
|
60
|
-
"ssr-hoc-react": "^6.1.
|
|
61
|
-
"ssr-server-utils": "^6.1.
|
|
62
|
-
"ssr-webpack": "^6.1.
|
|
59
|
+
"ssr-client-utils": "^6.1.74",
|
|
60
|
+
"ssr-hoc-react": "^6.1.74",
|
|
61
|
+
"ssr-server-utils": "^6.1.74",
|
|
62
|
+
"ssr-webpack": "^6.1.74",
|
|
63
63
|
"terser-webpack-plugin": "^2.3.5",
|
|
64
64
|
"url-loader": "^4.1.1",
|
|
65
65
|
"vite": "^2.7.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@types/react-router-dom": "^5.1.3",
|
|
76
76
|
"@types/webpack": "^4.41.10",
|
|
77
77
|
"concurrently": "^5.1.0",
|
|
78
|
-
"ssr-types-react": "^6.1.
|
|
78
|
+
"ssr-types-react": "^6.1.74"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "120a132ff06d5ac286f8fda3348ea0d0f6421036"
|
|
81
81
|
}
|
package/src/tools/vite.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { loadConfig, chunkNamePlugin, rollupOutputOptions, manifestPlugin, commo
|
|
|
3
3
|
import react from '@vitejs/plugin-react'
|
|
4
4
|
import styleImport, { AndDesignVueResolve, VantResolve, ElementPlusResolve, NutuiResolve, AntdResolve } from 'vite-plugin-style-import'
|
|
5
5
|
|
|
6
|
-
const { getOutput, reactServerEntry, reactClientEntry, viteConfig, supportOptinalChaining, isDev, define, babelOptions } = loadConfig()
|
|
6
|
+
const { getOutput, prefix, reactServerEntry, reactClientEntry, viteConfig, supportOptinalChaining, isDev, define, babelOptions } = loadConfig()
|
|
7
7
|
|
|
8
8
|
const { clientOutPut, serverOutPut } = getOutput()
|
|
9
9
|
const styleImportConfig = {
|
|
@@ -56,6 +56,7 @@ const serverConfig: UserConfig = {
|
|
|
56
56
|
|
|
57
57
|
const clientConfig: UserConfig = {
|
|
58
58
|
...commonConfig(),
|
|
59
|
+
base: isDev ? '/' : prefix,
|
|
59
60
|
esbuild: {
|
|
60
61
|
keepNames: true
|
|
61
62
|
},
|