@lark-apaas/miaoda-presets 0.1.0-alpha.18 → 0.1.0-alpha.19
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/lib/recommend/rspack.js +2 -2
- package/lib/rspack.config.js +1 -1
- package/package.json +1 -1
package/lib/recommend/rspack.js
CHANGED
|
@@ -10,7 +10,7 @@ const core_1 = __importDefault(require("@rspack/core"));
|
|
|
10
10
|
const RouteParserPlugin = require('../rspack-plugins/route-parser-plugin');
|
|
11
11
|
// eslint-disable-next-line max-lines-per-function
|
|
12
12
|
function createRecommendRspackConfig(options) {
|
|
13
|
-
const { enableReactRefresh = false, isDev = true, needRoutes = true,
|
|
13
|
+
const { enableReactRefresh = false, isDev = true, needRoutes = true, runtimeMode = 'fullstack', } = options;
|
|
14
14
|
return {
|
|
15
15
|
experiments: {
|
|
16
16
|
css: true,
|
|
@@ -115,7 +115,7 @@ function createRecommendRspackConfig(options) {
|
|
|
115
115
|
new core_1.default.DefinePlugin({
|
|
116
116
|
'process.env.NODE_ENV': JSON.stringify(isDev ? 'development' : 'production'),
|
|
117
117
|
'process.env.CWD': JSON.stringify(process.cwd()),
|
|
118
|
-
'process.env.
|
|
118
|
+
'process.env.runtimeMode': JSON.stringify(runtimeMode),
|
|
119
119
|
}),
|
|
120
120
|
new core_1.default.optimize.LimitChunkCountPlugin({
|
|
121
121
|
maxChunks: 1,
|
package/lib/rspack.config.js
CHANGED
|
@@ -29,7 +29,7 @@ function createRspackConfig(options) {
|
|
|
29
29
|
enableReactRefresh,
|
|
30
30
|
isDev: isDevBuildMode,
|
|
31
31
|
needRoutes: false,
|
|
32
|
-
|
|
32
|
+
runtimeMode: '',
|
|
33
33
|
});
|
|
34
34
|
return (0, webpack_merge_1.default)(recommendConfig, {
|
|
35
35
|
mode: isDevBuildMode ? 'development' : 'production',
|