@lark-apaas/miaoda-presets 0.1.0-alpha.16 → 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.
@@ -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, } = options;
13
+ const { enableReactRefresh = false, isDev = true, needRoutes = true, runtimeMode = 'fullstack', } = options;
14
14
  return {
15
15
  experiments: {
16
16
  css: true,
@@ -115,6 +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.runtimeMode': JSON.stringify(runtimeMode),
118
119
  }),
119
120
  new core_1.default.optimize.LimitChunkCountPlugin({
120
121
  maxChunks: 1,
@@ -179,7 +180,7 @@ function createRecommendRspackConfig(options) {
179
180
  const allowedOrigins = [
180
181
  'https://miaoda.feishu.cn',
181
182
  'https://miaoda.feishu-boe.cn',
182
- 'https://miaoda.feishu-pre.cn'
183
+ 'https://miaoda.feishu-pre.cn',
183
184
  ];
184
185
  // 检查请求的Origin是否在允许的列表中
185
186
  const allowedOrigin = allowedOrigins.includes(requestOrigin)
@@ -29,6 +29,7 @@ function createRspackConfig(options) {
29
29
  enableReactRefresh,
30
30
  isDev: isDevBuildMode,
31
31
  needRoutes: false,
32
+ runtimeMode: '',
32
33
  });
33
34
  return (0, webpack_merge_1.default)(recommendConfig, {
34
35
  mode: isDevBuildMode ? 'development' : 'production',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/miaoda-presets",
3
- "version": "0.1.0-alpha.16",
3
+ "version": "0.1.0-alpha.19",
4
4
  "files": [
5
5
  "lib"
6
6
  ],