@lark-apaas/miaoda-presets 0.1.0-alpha.16 → 0.1.0-alpha.18
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 +3 -2
- package/lib/rspack.config.js +1 -0
- 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, } = options;
|
|
13
|
+
const { enableReactRefresh = false, isDev = true, needRoutes = true, fullStackMode = true, } = 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.fullstack': JSON.stringify(fullStackMode),
|
|
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)
|
package/lib/rspack.config.js
CHANGED