ssr-plugin-react 6.2.85 → 7.0.1

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +63 -53
  3. package/cjs/entry/context.d.ts +0 -1
  4. package/cjs/entry/context.d.ts.map +1 -1
  5. package/cjs/entry/context.js +1 -2
  6. package/cjs/entry/context.js.map +1 -1
  7. package/cjs/entry/create.d.ts +0 -1
  8. package/cjs/entry/create.d.ts.map +1 -1
  9. package/cjs/entry/create.js +2 -2
  10. package/cjs/entry/create.js.map +1 -1
  11. package/cjs/entry/{client-entry.d.ts → react17-client-entry.d.ts} +1 -2
  12. package/cjs/entry/react17-client-entry.d.ts.map +1 -0
  13. package/cjs/entry/{client-entry.js → react17-client-entry.js} +11 -7
  14. package/cjs/entry/react17-client-entry.js.map +1 -0
  15. package/{esm/entry/client-entry.d.ts → cjs/entry/react18-client-entry.d.ts} +1 -2
  16. package/cjs/entry/react18-client-entry.d.ts.map +1 -0
  17. package/cjs/entry/react18-client-entry.js +62 -0
  18. package/cjs/entry/react18-client-entry.js.map +1 -0
  19. package/cjs/entry/server-entry.d.ts +0 -1
  20. package/cjs/entry/server-entry.d.ts.map +1 -1
  21. package/cjs/entry/server-entry.js +16 -4
  22. package/cjs/entry/server-entry.js.map +1 -1
  23. package/cjs/index.d.ts +0 -1
  24. package/cjs/index.d.ts.map +1 -1
  25. package/cjs/index.js +28 -37
  26. package/cjs/index.js.map +1 -1
  27. package/esm/entry/context.d.ts +0 -1
  28. package/esm/entry/context.d.ts.map +1 -1
  29. package/esm/entry/context.js.map +1 -1
  30. package/esm/entry/create.d.ts +0 -1
  31. package/esm/entry/create.d.ts.map +1 -1
  32. package/esm/entry/create.js.map +1 -1
  33. package/esm/entry/react17-client-entry.d.ts +3 -0
  34. package/esm/entry/react17-client-entry.d.ts.map +1 -0
  35. package/esm/entry/{client-entry.js → react17-client-entry.js} +11 -7
  36. package/esm/entry/react17-client-entry.js.map +1 -0
  37. package/esm/entry/react18-client-entry.d.ts +3 -0
  38. package/esm/entry/react18-client-entry.d.ts.map +1 -0
  39. package/esm/entry/react18-client-entry.js +59 -0
  40. package/esm/entry/react18-client-entry.js.map +1 -0
  41. package/esm/entry/server-entry.d.ts +0 -1
  42. package/esm/entry/server-entry.d.ts.map +1 -1
  43. package/esm/entry/server-entry.js +17 -5
  44. package/esm/entry/server-entry.js.map +1 -1
  45. package/esm/index.d.ts +0 -1
  46. package/esm/index.d.ts.map +1 -1
  47. package/esm/index.js +28 -22
  48. package/esm/index.js.map +1 -1
  49. package/package.json +24 -52
  50. package/src/entry/create.ts +0 -1
  51. package/src/entry/{client-entry.tsx → react17-client-entry.tsx} +37 -35
  52. package/src/entry/react18-client-entry.tsx +80 -0
  53. package/src/entry/server-entry.tsx +20 -5
  54. package/src/index.ts +30 -23
  55. package/.turbo/turbo-build.log +0 -7
  56. package/cjs/config/base.d.ts +0 -4
  57. package/cjs/config/base.d.ts.map +0 -1
  58. package/cjs/config/base.js +0 -49
  59. package/cjs/config/base.js.map +0 -1
  60. package/cjs/config/client.d.ts +0 -5
  61. package/cjs/config/client.d.ts.map +0 -1
  62. package/cjs/config/client.js +0 -54
  63. package/cjs/config/client.js.map +0 -1
  64. package/cjs/config/index.d.ts +0 -3
  65. package/cjs/config/index.d.ts.map +0 -1
  66. package/cjs/config/index.js +0 -19
  67. package/cjs/config/index.js.map +0 -1
  68. package/cjs/config/server.d.ts +0 -6
  69. package/cjs/config/server.d.ts.map +0 -1
  70. package/cjs/config/server.js +0 -39
  71. package/cjs/config/server.js.map +0 -1
  72. package/cjs/entry/client-entry.d.ts.map +0 -1
  73. package/cjs/entry/client-entry.js.map +0 -1
  74. package/cjs/tools/vite.d.ts +0 -9
  75. package/cjs/tools/vite.d.ts.map +0 -1
  76. package/cjs/tools/vite.js +0 -142
  77. package/cjs/tools/vite.js.map +0 -1
  78. package/cjs/tools/webpack.d.ts +0 -3
  79. package/cjs/tools/webpack.d.ts.map +0 -1
  80. package/cjs/tools/webpack.js +0 -23
  81. package/cjs/tools/webpack.js.map +0 -1
  82. package/esm/config/base.d.ts +0 -4
  83. package/esm/config/base.d.ts.map +0 -1
  84. package/esm/config/base.js +0 -46
  85. package/esm/config/base.js.map +0 -1
  86. package/esm/config/client.d.ts +0 -5
  87. package/esm/config/client.d.ts.map +0 -1
  88. package/esm/config/client.js +0 -51
  89. package/esm/config/client.js.map +0 -1
  90. package/esm/config/index.d.ts +0 -3
  91. package/esm/config/index.d.ts.map +0 -1
  92. package/esm/config/index.js +0 -3
  93. package/esm/config/index.js.map +0 -1
  94. package/esm/config/server.d.ts +0 -6
  95. package/esm/config/server.d.ts.map +0 -1
  96. package/esm/config/server.js +0 -36
  97. package/esm/config/server.js.map +0 -1
  98. package/esm/entry/client-entry.d.ts.map +0 -1
  99. package/esm/entry/client-entry.js.map +0 -1
  100. package/esm/tools/vite.d.ts +0 -9
  101. package/esm/tools/vite.d.ts.map +0 -1
  102. package/esm/tools/vite.js +0 -134
  103. package/esm/tools/vite.js.map +0 -1
  104. package/esm/tools/webpack.d.ts +0 -3
  105. package/esm/tools/webpack.d.ts.map +0 -1
  106. package/esm/tools/webpack.js +0 -18
  107. package/esm/tools/webpack.js.map +0 -1
  108. package/src/config/base.ts +0 -57
  109. package/src/config/client.ts +0 -62
  110. package/src/config/index.ts +0 -2
  111. package/src/config/server.ts +0 -43
  112. package/src/tools/vite.ts +0 -134
  113. package/src/tools/webpack.ts +0 -20
@@ -1,18 +0,0 @@
1
- import * as WebpackChain from 'webpack-chain';
2
- export const webpackStart = async () => {
3
- const { startServerBuild } = await import('ssr-webpack/cjs/server');
4
- const { getServerWebpack } = await import('../config/server');
5
- const serverConfigChain = new WebpackChain();
6
- const { startClientServer } = await import('ssr-webpack');
7
- const { getClientWebpack } = await import('../config');
8
- const clientConfigChain = new WebpackChain();
9
- await Promise.all([startServerBuild(getServerWebpack(serverConfigChain)), startClientServer(getClientWebpack(clientConfigChain))]);
10
- };
11
- export const webpackBuild = async () => {
12
- const { startServerBuild, startClientBuild } = await import('ssr-webpack');
13
- const { getClientWebpack, getServerWebpack } = await import('../config');
14
- const serverConfigChain = new WebpackChain();
15
- const clientConfigChain = new WebpackChain();
16
- await Promise.all([startServerBuild(getServerWebpack(serverConfigChain)), startClientBuild(getClientWebpack(clientConfigChain))]);
17
- };
18
- //# sourceMappingURL=webpack.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webpack.js","sourceRoot":"","sources":["../../src/tools/webpack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAA;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;IACtC,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAA;IACnE,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;IAC7D,MAAM,iBAAiB,GAAG,IAAI,YAAY,EAAE,CAAA;IAE5C,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAA;IACzD,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAA;IACtD,MAAM,iBAAiB,GAAG,IAAI,YAAY,EAAE,CAAA;IAC5C,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;AACnI,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;IACtC,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAA;IAC1E,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAA;IACxE,MAAM,iBAAiB,GAAG,IAAI,YAAY,EAAE,CAAA;IAC5C,MAAM,iBAAiB,GAAG,IAAI,YAAY,EAAE,CAAA;IAC5C,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;AAClI,CAAC,CAAA"}
@@ -1,57 +0,0 @@
1
- import { join } from 'path'
2
- import { addCommonChain, getBuildConfig, getCwd, loadConfig, loadModuleFromFramework, setStyle } from 'ssr-common-utils'
3
- import { Mode } from 'ssr-types'
4
- import * as webpack from 'ssr-webpack4'
5
- import WebpackChain from 'webpack-chain'
6
-
7
- const MiniCssExtractPlugin = require(loadModuleFromFramework('ssr-mini-css-extract-plugin'))
8
- const WebpackBar = require('webpackbar')
9
-
10
- const getBaseConfig = (chain: WebpackChain, isServer: boolean) => {
11
- const config = loadConfig()
12
- const { moduleFileExtensions, chainBaseConfig, alias, define } = config
13
- const mode = process.env.NODE_ENV as Mode
14
-
15
- chain.mode(mode)
16
- chain.module.strictExportPresence(true)
17
- chain.resolve.modules.add('node_modules').add(join(getCwd(), './node_modules')).end().extensions.merge(moduleFileExtensions).end().alias.end()
18
-
19
- alias &&
20
- Object.keys(alias).forEach((item) => {
21
- chain.resolve.alias.set(item, alias[item])
22
- })
23
- addCommonChain(chain, isServer)
24
- setStyle(chain, /\.css$/, {
25
- rule: 'css',
26
- isServer,
27
- importLoaders: 1
28
- })
29
-
30
- setStyle(chain, /\.less$/, {
31
- rule: 'less',
32
- loader: 'less-loader',
33
- isServer,
34
- importLoaders: 2
35
- })
36
-
37
- chain.plugin('minify-css').use(MiniCssExtractPlugin, getBuildConfig().cssBuildConfig)
38
-
39
- chain.plugin('webpackBar').use(
40
- new WebpackBar({
41
- name: isServer ? 'server' : 'client',
42
- color: isServer ? '#f173ac' : '#45b97c'
43
- })
44
- )
45
- chain.plugin('ssrDefine').use(webpack.DefinePlugin, [
46
- {
47
- ...process.env,
48
- __isBrowser__: !isServer,
49
- ...(isServer ? define?.server : define?.client),
50
- ...define?.base
51
- }
52
- ])
53
- chainBaseConfig(chain, isServer)
54
- return config
55
- }
56
-
57
- export { getBaseConfig }
@@ -1,62 +0,0 @@
1
- import { asyncChunkMap, getBuildConfig, getOutputPublicPath, getSplitChunksOptions, loadConfig, loadModuleFromFramework, terserConfig } from 'ssr-common-utils'
2
- import WebpackChain from 'webpack-chain'
3
- import { getBaseConfig } from './base'
4
-
5
- const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin')
6
- const safePostCssParser = require('postcss-safe-parser')
7
- const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
8
- const loadModule = loadModuleFromFramework
9
-
10
- const getClientWebpack = (chain: WebpackChain) => {
11
- const { isDev, chunkName, getOutput, cwd, chainClientConfig, host, fePort } = loadConfig()
12
- const buildConfig = getBuildConfig()
13
-
14
- const shouldUseSourceMap = isDev || Boolean(process.env.GENERATE_SOURCEMAP)
15
- const publicPath = getOutputPublicPath()
16
- getBaseConfig(chain, false)
17
- chain.entry(chunkName).add(require.resolve('../entry/client-entry')).end().output.path(getOutput().clientOutPut).filename(buildConfig.jsBuldConfig.fileName).chunkFilename(buildConfig.jsBuldConfig.chunkFileName).publicPath(publicPath).end()
18
- chain.optimization
19
- .runtimeChunk(true)
20
- .splitChunks(getSplitChunksOptions(asyncChunkMap))
21
- .when(!isDev, (optimization) => {
22
- optimization.minimizer('terser').use(loadModule('terser-webpack-plugin'), [terserConfig(false)])
23
- optimization.minimizer('optimize-css').use(loadModule('optimize-css-assets-webpack-plugin'), [
24
- {
25
- cssProcessorOptions: {
26
- parser: safePostCssParser,
27
- map: shouldUseSourceMap
28
- ? {
29
- inline: false,
30
- annotation: true
31
- }
32
- : false
33
- }
34
- }
35
- ])
36
- })
37
-
38
- chain.plugin('moduleNotFound').use(ModuleNotFoundPlugin, [cwd])
39
-
40
- chain.plugin('manifest').use(loadModule('webpack-manifest-plugin'), [
41
- {
42
- fileName: 'asset-manifest.json'
43
- }
44
- ])
45
-
46
- chain.when(isDev, (chain) => {
47
- chain.plugin('fast-refresh').use(
48
- new ReactRefreshWebpackPlugin({
49
- overlay: {
50
- sockHost: host,
51
- sockPort: fePort
52
- }
53
- })
54
- )
55
- })
56
-
57
- chainClientConfig(chain) // 合并用户自定义配置
58
-
59
- return chain.toConfig()
60
- }
61
-
62
- export { getClientWebpack }
@@ -1,2 +0,0 @@
1
- export * from './client'
2
- export * from './server'
@@ -1,43 +0,0 @@
1
- import { loadConfig, loadModuleFromFramework } from 'ssr-common-utils'
2
- import * as webpack from 'ssr-webpack4'
3
- import WebpackChain from 'webpack-chain'
4
-
5
- import { getBaseConfig } from './base'
6
-
7
- const getServerWebpack = (chain: WebpackChain) => {
8
- const config = loadConfig()
9
- const { isDev, getOutput, chainServerConfig, chunkName } = config
10
- const shouldUseSourceMap = isDev || Boolean(process.env.GENERATE_SOURCEMAP)
11
- getBaseConfig(chain, true)
12
- chain.target('node')
13
- chain.entry(chunkName).add(require.resolve('../entry/server-entry')).end().output.path(getOutput().serverOutPut).filename('[name].server.js').libraryTarget('commonjs')
14
-
15
- if (!isDev) {
16
- chain.optimization.minimizer('terser').use(loadModuleFromFramework('terser-webpack-plugin'), [
17
- {
18
- terserOptions: {
19
- keep_fnames: true
20
- },
21
- extractComments: false,
22
- parallel: true,
23
- cache: true,
24
- sourceMap: shouldUseSourceMap
25
- }
26
- ])
27
- }
28
- chain.when(isDev, () => {
29
- chain.watch(true)
30
- })
31
-
32
- chain.plugin('serverLimit').use(webpack.optimize.LimitChunkCountPlugin, [
33
- {
34
- maxChunks: 1
35
- }
36
- ])
37
-
38
- chainServerConfig(chain) // 合并用户自定义配置
39
-
40
- return chain.toConfig()
41
- }
42
-
43
- export { getServerWebpack }
package/src/tools/vite.ts DELETED
@@ -1,134 +0,0 @@
1
- import { resolve } from 'path'
2
- import react from '@vitejs/plugin-react'
3
- import { visualizer } from 'rollup-plugin-visualizer'
4
- import { asyncOptimizeChunkPlugin, chunkNamePlugin, commonConfig, getCwd, getOutputPublicPath, getPkgMajorVersion, loadConfig, manifestPlugin, rollupOutputOptions } from 'ssr-common-utils'
5
- import { AndDesignVueResolve, AntdResolve, ElementPlusResolve, NutuiResolve, VantResolve, createStyleImportPlugin } from 'ssr-vite-plugin-style-import'
6
- import { UserConfig, build } from 'vite'
7
- const { getOutput, reactServerEntry, reactClientEntry, viteConfig, supportOptinalChaining, isDev, define, babelOptions, optimize } = loadConfig()
8
- const { clientOutPut, serverOutPut } = getOutput()
9
- const isAntd5 = getPkgMajorVersion('antd') === 5
10
- const extraInclude = ([] as string[]).concat(isAntd5 ? ['react-is'] : [])
11
-
12
- const styleImportConfig = {
13
- include: ['**/*.vue', '**/*.ts', '**/*.js', '**/*.tsx', '**/*.jsx', /chunkName/],
14
- resolves: [AndDesignVueResolve(), VantResolve(), ElementPlusResolve(), NutuiResolve(), AntdResolve()]
15
- }
16
- const serverPlugins = [
17
- react({
18
- ...viteConfig?.()?.server?.defaultPluginOptions,
19
- jsxRuntime: 'automatic',
20
- babel: {
21
- ...babelOptions,
22
- plugins: [...(babelOptions?.plugins ?? []), ...(!supportOptinalChaining ? ['@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-nullish-coalescing-operator'] : [])]
23
- }
24
- }),
25
- viteConfig?.()?.common?.extraPlugin,
26
- viteConfig?.()?.server?.extraPlugin,
27
- createStyleImportPlugin(styleImportConfig)
28
- ].filter(Boolean)
29
-
30
- const serverConfig: UserConfig = {
31
- ...commonConfig(),
32
- ...viteConfig?.().server?.otherConfig,
33
- plugins: viteConfig?.()?.server?.processPlugin?.(serverPlugins) ?? serverPlugins,
34
- esbuild: {
35
- ...viteConfig?.().server?.otherConfig?.esbuild,
36
- keepNames: true,
37
- logOverride: { 'this-is-undefined-in-esm': 'silent' }
38
- },
39
- optimizeDeps: {
40
- ...viteConfig?.().server?.otherConfig?.optimizeDeps,
41
- include: extraInclude.concat(...(viteConfig?.().server?.otherConfig?.optimizeDeps?.include ?? [])),
42
- esbuildOptions: {
43
- ...viteConfig?.().server?.otherConfig?.optimizeDeps?.esbuildOptions,
44
- // @ts-expect-error
45
- bundle: isDev
46
- }
47
- },
48
- build: {
49
- minify: !process.env.NOMINIFY,
50
- ...viteConfig?.().server?.otherConfig?.build,
51
- ssr: reactServerEntry,
52
- outDir: serverOutPut,
53
- rollupOptions: {
54
- ...viteConfig?.().server?.otherConfig?.build?.rollupOptions,
55
- input: isDev ? reactClientEntry : reactServerEntry, // setting prebundle list by client-entry in dev
56
- output: {
57
- entryFileNames: 'Page.server.js',
58
- assetFileNames: rollupOutputOptions().assetFileNames
59
- }
60
- }
61
- },
62
- define: {
63
- ...viteConfig?.().server?.otherConfig?.define,
64
- __isBrowser__: false,
65
- ...define?.base,
66
- ...define?.server
67
- }
68
- }
69
- const clientPlugins = [
70
- react({
71
- ...viteConfig?.()?.client?.defaultPluginOptions,
72
- jsxRuntime: 'automatic',
73
- ...babelOptions
74
- }),
75
- viteConfig?.()?.common?.extraPlugin,
76
- viteConfig?.()?.client?.extraPlugin,
77
- createStyleImportPlugin(styleImportConfig)
78
- ].filter(Boolean)
79
- const analyzePlugin = process.env.GENERATE_ANALYSIS ? visualizer({ filename: resolve(getCwd(), './build/stat.html'), open: true }) : null
80
-
81
- const clientConfig: UserConfig = {
82
- ...commonConfig(),
83
- ...viteConfig?.().client?.otherConfig,
84
- base: isDev ? '/' : getOutputPublicPath(),
85
- esbuild: {
86
- ...viteConfig?.().client?.otherConfig?.esbuild,
87
- keepNames: true,
88
- logOverride: { 'this-is-undefined-in-esm': 'silent' }
89
- },
90
- optimizeDeps: {
91
- ...viteConfig?.().client?.otherConfig?.optimizeDeps,
92
- include: ['react-router', ...extraInclude].concat(...(viteConfig?.().client?.otherConfig?.optimizeDeps?.include ?? [])),
93
- exclude: ['ssr-hoc-react'].concat(...(viteConfig?.().client?.otherConfig?.optimizeDeps?.exclude ?? []))
94
- },
95
- plugins: viteConfig?.()?.client?.processPlugin?.(clientPlugins) ?? clientPlugins,
96
- build: {
97
- minify: !process.env.NOMINIFY,
98
- ...viteConfig?.().client?.otherConfig?.build,
99
- ...(optimize ? { write: false } : {}),
100
- ssrManifest: true,
101
- outDir: clientOutPut,
102
- rollupOptions: {
103
- ...viteConfig?.().client?.otherConfig?.build?.rollupOptions,
104
- input: reactClientEntry,
105
- output: rollupOutputOptions(),
106
- plugins: [chunkNamePlugin(), asyncOptimizeChunkPlugin(), manifestPlugin(), analyzePlugin]
107
- }
108
- },
109
- define: {
110
- ...viteConfig?.().client?.otherConfig?.define,
111
- __isBrowser__: true,
112
- ...define?.base,
113
- ...define?.client
114
- }
115
- }
116
- const viteStart = async () => {
117
- //
118
- }
119
- const viteBuild = async () => {
120
- await build({ ...clientConfig, mode: 'production' })
121
- await build({ ...serverConfig, mode: process.env.VITEMODE ?? 'production' })
122
- }
123
-
124
- const viteBuildClient = async () => {
125
- await build({
126
- ...clientConfig,
127
- mode: process.env.VITEMODE ?? 'production'
128
- }).catch((_) => {})
129
- }
130
- const viteBuildServer = async () => {
131
- await build({ ...serverConfig, mode: process.env.VITEMODE ?? 'production' })
132
- }
133
-
134
- export { viteBuild, viteStart, serverConfig, clientConfig, viteBuildClient, viteBuildServer }
@@ -1,20 +0,0 @@
1
- import * as WebpackChain from 'webpack-chain'
2
-
3
- export const webpackStart = async () => {
4
- const { startServerBuild } = await import('ssr-webpack/cjs/server')
5
- const { getServerWebpack } = await import('../config/server')
6
- const serverConfigChain = new WebpackChain()
7
-
8
- const { startClientServer } = await import('ssr-webpack')
9
- const { getClientWebpack } = await import('../config')
10
- const clientConfigChain = new WebpackChain()
11
- await Promise.all([startServerBuild(getServerWebpack(serverConfigChain)), startClientServer(getClientWebpack(clientConfigChain))])
12
- }
13
-
14
- export const webpackBuild = async () => {
15
- const { startServerBuild, startClientBuild } = await import('ssr-webpack')
16
- const { getClientWebpack, getServerWebpack } = await import('../config')
17
- const serverConfigChain = new WebpackChain()
18
- const clientConfigChain = new WebpackChain()
19
- await Promise.all([startServerBuild(getServerWebpack(serverConfigChain)), startClientBuild(getClientWebpack(clientConfigChain))])
20
- }